Skip to main content

mini version control system written in python

Project description

py-git

A mini version control system written in Python, inspired by Git.

Overview

py-git is a lightweight version control system that implements the core functionality of Git. It's designed to be simple, educational, and functional for basic version control needs.

Features

  • Initialize a repository
  • Stage files for commit
  • Commit changes with messages
  • View repository status
  • View commit history
  • Compare file differences
  • Checkout previous commits

Installation

pip install py-git

Usage

# Initialize a new repository
py-git init

# Add files to staging area
py-git add file.txt
py-git add .  # Add all files

# Commit changes
py-git commit "Add initial files"

# Check repository status
py-git status

# View commit history
py-git logs

# View differences in a file
py-git diff file.txt

# Checkout a specific commit
py-git checkout <commit_hash>

# Display help
py-git --help

Project Structure

py-git/
├── py_git/
│   ├── core/           # Core functionality
│   │   ├── add.py
│   │   ├── checkout.py
│   │   ├── commit.py
│   │   ├── diff.py
│   │   ├── init.py
│   │   ├── logs.py
│   │   └── status.py
│   ├── helpers/        # Helper functions
│   │   ├── commit_files.py
│   │   ├── current_files.py
│   │   └── is_a_repos.py
│   ├── __init__.py
│   └── cli.py          # Command-line interface
├── pyproject.toml      # Project configuration
└── README.md           # This file

- Python 3.12 or higher

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minipygit-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minipygit-0.1.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file minipygit-0.1.0.tar.gz.

File metadata

  • Download URL: minipygit-0.1.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for minipygit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 771bf2958e4d6dc92ad59c385257a158f99914b47f69450947e8c478a12e8835
MD5 6a0b57cf8ed546cdf732cec7a9c40b47
BLAKE2b-256 8861054ce23aae42c0e4b4f3053c3c225e71f3060666a19b03ef2ce9ac648152

See more details on using hashes here.

File details

Details for the file minipygit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: minipygit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for minipygit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7635f446ace487e028ba8218da46270ee8de468b9b9edec373cca20d82c98ac0
MD5 0e71e3abae7b00cfceeeeb6e6d73f8ee
BLAKE2b-256 fe33b4afa8aa2a2174a48a79c9b225e59e7eba9bb874ff6c9d894b960a46dea6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page