Revu is a simple, custom-built version control system inspired by Git. It helps you track file changes, commit snapshots, and view diffs, using the command line. Ideal for learning how Git works under the hood.
Features:
- ✅ Initialize a
.revurepository - ✅ Add files to staging area
- ✅ Commit staged files
- ✅ View commit history
- ✅ View differences between commits (diff)
Ensure you have Node.js installed (v20.x or later).
git clone https://github.com/your-username/revu.git
cd revu
chmod +x Revu.mjsTo use ./Revu.mjs like a global CLI:
sudo ln -s $(pwd)/Revu.mjs /usr/local/bin/revuNow you can run revu from anywhere.
Initializes a new .revu repository in the current directory.
revu initAdds a file to the staging area.
revu add sample.txtCommits all staged files with a message.
revu commit "Initial commit"Shows the history of all commits.
revu logShows the differences (diff) of files between this and previous commit.
revu show <commit-hash>| Folder/File | Description |
|---|---|
.revu/ |
Stores objects and metadata |
.revu/HEAD |
Points to the latest commit |
.revu/index |
Holds the staging area data |
.revu/objects/ |
Stores file blobs and commit snapshots |
- No branch support
- Works only on files (not directories)
- Commits are snapshot-based
- No remote or push/pull functionality
This tool is built to learn Git's internal structure. It is not a replacement for Git but a hands-on way to understand how it works.
- Mohammad Ali
- GitHub: @MohammadAliiiii
Let me know if you'd like any adjustments!