Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1.17 KB

File metadata and controls

47 lines (29 loc) · 1.17 KB

Simple-VCS-Python

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.

Features

  • 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.

How to Use

1. Initialize the VCS

Start by creating your local storage folder:

python vcs.py init

2. Create a Snapshot

Save the current state of all files in your directory:

python vcs.py snapshot

3. List History

View all previously saved versions:

python vcs.py list

4. Revert to a Version

If you want to go back in time, use the Hash ID:

python vcs.py revert <your-hash-id>