A lightweight, custom-built Version Control System (VCS) inspired by Git. This project implements the core logic of versioning, including content-addressable storage, SHA-256 hashing for data integrity, and a restoration engine.
- Initialization: Sets up a local storage vault for snapshots.
- SHA-256 Hashing: Generates unique fingerprints for project states to ensure no data is lost or corrupted.
- Snapshot Engine: Captures the entire directory tree and serializes file contents using
pickle. - Restoration (Rollback): Replaces the current working directory with a previous state from the vault.
- Clean Sync: Automatically removes files created after a snapshot during a revert.
Start by creating your local storage folder:
python vcs.py init
Save the current state of all files in your directory:
python vcs.py snapshot
View all previously saved versions:
python vcs.py list
If you want to go back in time, use the Hash ID:
python vcs.py revert <your-hash-id>