A minimal Git reimplementation in Python
Wyag Lite (Write Yourself A Git - Lite) is a simplified reimplementation of Git written entirely in Python.
Itβs designed as an educational project to help developers understand the internal mechanics of Git:
repositories, objects, commits, trees, and more β by rebuilding them from scratch.
- π Initialize a new repository (
wyag init) - π Add and commit files (Work in Progress)
- π Inspect objects (
cat-file,ls-tree, etc.) - π·οΈ Manage refs and tags
- β Basic status and log commands
-
Learn Git internals by coding them step by step
-
Provide a reference for students & enthusiasts
-
Create a playground for experimenting with version control
Contributions, issues, and pull requests are welcome! If youβre also studying Git internals, feel free to fork and extend the project.
MIT License β free to use, modify, and distribute.
- Python 3.10+
- No external libraries (only Python standard library)
Clone the repository and run the wyag.py script:
git clone https://github.com/khaled-dev123/wyag-lite.git
cd wyag-lite
# Initialize a new repository
python3 wyag.py init myrepo