Distributed Version Control

The Time Machine
for Code

Git tracks every change, enables fearless branching, and powers collaboration across the planet. Explore it interactively.

0
Million Devs
0
Million Repos
0
Year Created

Build a Commit Graph

Click the buttons to simulate Git operations and watch the commit DAG grow in real time.

Simulated Terminal

Type Git commands and see simulated output. Try: init, status, add, commit, log, branch, checkout, diff, stash, remote.

~/my-project — bash
Welcome to the Git simulator. Type a git command to begin.
Try: git init, git status, git add, git commit -m "msg", git log
~/my-project $ 

Command Atlas

Click any card to expand usage details. Organized by workflow stage.

Git Object Model

Everything in Git is a content-addressable object stored as a SHA-1 hash. Four object types form the entire data model.

📄
Blob
Raw file contents. No filename, no metadata — just bytes. Identical files across branches share the same blob.
📁
Tree
A directory listing. Maps filenames to blob hashes (or other trees for subdirectories). This is your snapshot's filesystem.
💾
Commit
Points to a tree + parent commit(s). Stores author, timestamp, message. The chain of commits forms the DAG.
🏷️
Tag
A named reference to a commit with optional GPG signature. Annotated tags are full objects; lightweight tags are just refs.

Git Knowledge Check

Eight questions from basics to internals. No peeking at the cheat sheet.

Cheat Sheet

Setup & Init

git initNew repo
git clone <url>Copy remote
git config --global user.nameSet identity

Stage & Snapshot

git add .Stage all
git commit -m "msg"Save snapshot
git stashShelve changes
git reset HEAD~1Undo last commit

Branch & Merge

git branch <name>Create branch
git switch <name>Switch branch
git merge <branch>Merge in
git rebase <base>Replay on top

Inspect & Compare

git log --oneline --graphVisual history
git diffUnstaged changes
git blame <file>Line-by-line author
git reflogEvery HEAD move

Share & Sync

git push origin mainUpload commits
git pull --rebaseFetch + rebase
git fetch --allDownload refs
git remote -vList remotes

Undo & Recover

git revert <sha>Safe undo commit
git cherry-pick <sha>Copy one commit
git bisect startBinary search bug
git clean -fdRemove untracked