Note
Will change the name.(Probably) (This is just a prototype and will port it to Go(mostly) or C.)
FOB is a lightweight version control system implemented in Python. It provides basic version control functionality similar to Git, allowing you to track changes in your files and maintain a history of your project.
- Initialize a new repository
- Stage files for commit
- Commit changes with messages
- View commit history
- Ignore files using
.fobignore
FOB requires Python 3.12 or higher. This project uses uv
for dependency management.
First, install uv if you haven't already(check here):
https://docs.astral.sh/uv/getting-started/installation/
Create a new FOB repository in your current directory:
python main.py init
This will create a .fob
directory to store all version control information.
Add specific files to the staging area:
python main.py add filename.txt
Add all files in the current directory:
python main.py add .
Commit staged changes with a message:
python main.py commit "Your commit message here"
View the commit history:
python main.py log
Create a .fobignore
file in your repository root and add patterns for files you want to ignore:
.venv
__pycache__
.python-version
FOB stores all version control information in the .fob
directory:
commits/
: Directory containing all commit dataindex.json
: Staging area for changesHEAD
: Points to the current commit
Each commit is stored as a JSON file containing:
- Commit ID (UUID)
- Commit message
- Timestamp
- File contents at the time of commit
- Python >= 3.12
- typer >= 0.15.2
Feel free to submit issues and enhancement requests!