Skip to content

Debkumar-Baksi/Write_Yourself_A_Git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Wyag β€” The Stupidest Content Tracker

Wyag is a Git-like version control system built from scratch in Python.
The name stands for Write Yourself A Git, inspired by the idea of learning by building.

πŸš€ β€œThe best way to understand Git is to build Git.”


✨ Features

  • init – Create a new repository
  • add – Stage files to the index
  • commit – Save snapshots of your code
  • log – View commit history as a DAG
  • status – See what's staged, modified, or untracked
  • ls-files, ls-tree, rev-parse, show-ref, tag, checkout, and more
  • .gitignore support
  • Compatible with Windows CMD, PowerShell, and Linux shell

πŸ›  How to Use

  • Clone the project
    git clone https://github.com/Debkumar-Baksi/Write_Yourself_A_Git.git
  • Move into the project folder

    cd Write_Yourself_A_Git
  • Initialize a new repository

    python wyag init myrepo
    cd myrepo
  • Create a file

    echo Hello, Wyag! > test.txt
  • Add and commit

    python ..\wyag add test.txt
    python ..\wyag commit -m "Initial commit"
  • View status and log

    python ..\wyag status
    python ..\wyag log

πŸ“¦ Available Commands

python wyag init myrepo
python wyag add file.txt
python wyag commit -m "message"
python wyag status
python wyag ls-files
python wyag log
python wyag ls-tree HEAD
python wyag rev-parse HEAD
python wyag tag v1.0
python wyag tag
python wyag show-ref
python wyag checkout HEAD checkout-dir
python wyag rm file.txt
python wyag hash-object -w file.txt
python wyag cat-file blob <sha>
python wyag check-ignore file.pyc

πŸ’‘ Why I Built This

I built Wyag to understand how Git works under the hood. By re-creating Git’s core concepts β€” blobs, trees, commits, refs β€” I gained a deeper understanding of version control, file storage, and DAG-based history.

This project helped me master:

  • Git internals
  • File systems and binary formats
  • Hashing and data integrity
  • Python I/O and CLI design

🌱 What’s Next

  • Commit graph visualization
  • Branching and merging
  • Web frontend for viewing repo state
  • Improved diff and patching

πŸ“Œ License

MIT License β€” free to use, share, and modify.


Made with πŸ’» and β˜• by Debkumar

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published