____ _______ __ / __ \__ __ / ____(_) /_ / /_/ / / / / ______ / / __/ / __/ / ____/ /_/ / /_____/ / /_/ / / /_ /_/ \__, / \____/_/\__/, /____/
A Python implementation of a Git-like version control system, featuring a colorful ASCII logo and essential version control commands. PyGit is designed for learning, experimentation, and small projects.
- Initialize a new repository (
init
) - Add files to the staging area (
add
) - View repository status (
status
) - Commit changes (
commit
) - View commit history (
log
) - Show file differences (
diff
) - Create and list branches (
branch
) - Switch branches (
checkout
) - Colorful, centered ASCII logo on startup
- Python 3.7+
- colorama (for colored terminal output)
Install dependencies:
pip install colorama
Clone the repository:
git clone https://github.com/yourusername/PyGit.git
cd PyGit
Run the CLI:
python main.py --help
Example output:
____ _______ __
/ __ \__ __ / ____(_) /_
/ /_/ / / / / ______ / / __/ / __/
/ ____/ /_/ / /_____/ / /_/ / / /_
/_/ \__, / \____/_/\__/,
/____/
Py - Git
usage: main.py [-h] {init,add,status,commit,log,diff,branch,checkout} ...
PyGit - A Git clone in Python
positional arguments:
{init,add,status,commit,log,diff,branch,checkout}
Available commands
init Initialize a new repository
add Add files to staging area
status Show repository status
commit Create a new commit
log Show commit history
diff Show differences
branch List or create branches
checkout Switch branches
options:
-h, --help show this help message and exit
- Initialize a repo:
python main.py init
- Add files:
python main.py add file.txt
- Commit changes:
python main.py commit -m "Initial commit"
- View status:
python main.py status
- View log:
python main.py log
- Diff:
python main.py diff
- Branch:
python main.py branch new-feature python main.py branch --all
- Checkout:
python main.py checkout new-feature
Contributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.
This project is licensed under the MIT License.