Git History Playground
InteractiveBeginnerA faithful in-memory Git model with a live commit graph: run git init, add, commit, branch, switch, merge, reset and revert — and watch the DAG redraw itself. Classic ASCII log --graph output, six guided missions, and deep-links from every Git course practice block.
Repository state
Branches
— none yet —
Working directory
— empty —
Command surface
shell
touch <file>create an empty fileecho "text" > filewrite a file (>> appends)lslist working files
snapshots
git initstart the repositorygit statusstaged / modified / untrackedgit add <file|·.>stage current contentgit commit -m "msg"snapshot the indexgit diffworking vs staging
pointers
git branch [name]list / create a pointergit switch -c <name>create + move HEADgit merge <name>ff or merge commitgit log --graph --oneline --allASCII topologygit graphshortcut for the above
undo
git restore <file>discard working edits ✗git restore --staged <f>unstage, keep editsgit reset --soft HEAD~1move pointer, keep indexgit reset --hard HEAD~1move pointer, wipe tree ✗git revert HEADnew inverse commit
No remotes, no rebase, no stash — a strict teaching subset. Same-file changes on both branches trigger a CONFLICT on merge (by design).
Live commit graph
nodes = snapshots · chips = branch pointers · ringed node = merge commit0 commits · 0 branchesNot a repository yet
Run git init in the terminal — every snapshot you commit will draw itself here.