Nobody is scared of Git commands. People are scared of what the commands might do, because they are typing into a system whose model they cannot see. git rebase main: will that neatly replay my work or eat the afternoon? If you cannot picture the answer, every command is a small gamble, and people who feel like they are gambling copy commands from Stack Overflow and hope.
The fix is not memorizing more commands. It is being able to see the commit graph in your head: commits as snapshots chained by parents, branches as movable pointers into that chain, merge and rebase as two different ways of knitting chains together. Once that picture exists, Git's commands become obvious names for obvious operations.
Two free browser tools, used in the right order, build exactly that. Disclosure: I help build them; both run in the browser, free, no signup.
Step 1: see the graph
The Git Concepts Simulator is a guided tour over a visual commit graph, six lessons long, and the lesson names are the mental model itself:
- Mental Model: commits, parents, and what a repository actually stores.
- Stage & Commit: the two-step dance everyone does but few can explain: working tree to index to commit.
-
Remote Sync: what fetch actually brings down, and why
origin/mainandmainare two different pointers that drift apart. -
Branch Pointers: the lesson that ends the most fear. A branch is a label pointing at a commit, nothing more. Creating one costs nothing, and switching moves
HEAD(and your working tree) to where the label points. - Merge Concepts: when Git can fast-forward, watched on the graph: your branch pointer simply slides ahead because the history never diverged.
- Fetch & Rebase: rebase as "replay my commits on a new base", watched live on the graph, where it finally makes visual sense.
The moment worth the whole exercise is in the branch and merge lessons: you watch a pointer move while the commits stand still. Most Git fear is the belief that commands move your work around; seeing that many commands move labels, while commits themselves are immutable snapshots, reframes the whole tool. That is also the practical meaning of "undo" in Git: a commit you made rarely vanishes immediately, and recovery is usually pointing a branch back at it. (The full caveat: commits with no reference pointing at them survive in the reflog for a grace period, not forever, so "recoverable" has an expiry date.)
Step 2: pressure-test it
Understanding checked in a calm tutorial evaporates under pressure. That is what the Git Command Quiz is for: eight scenario questions (three beginner, three intermediate, two advanced, maybe fifteen minutes) where you read a situation, branch state and sometimes a conflict, and pick the command that fits, with a hint if you want one and an explanation after you answer.
The quiz's real value is that its wrong answers are plausible: options like git merge --squash and git rebase both "combine work", and choosing correctly in a given scenario is the graph-model knowledge from step 1 applied. Read the explanations even when you are right; knowing why the distractors are wrong is where the confidence comes from.
A concrete pairing that works: after each simulator lesson, do a few quiz rounds and notice which scenarios you now answer from the picture in your head instead of from memory. That transfer, model to decision, is the skill; the quiz just measures it.
Step 3: take it to a real repo
Simulators build the model; a real repository makes it muscle memory. The safest way is to make Git's actual behavior visible while you work:
# a scratch repo nobody can be hurt by
mkdir git-playground && cd git-playground
git init -b main
echo start > file.txt && git add . && git commit -m "first commit"
# make a mess on purpose, then practice pointing your way out
git switch -c experiment
echo change >> file.txt && git add . && git commit -m "try something"
git switch main
git merge experiment
# the command that turns any terminal into an ASCII version of the graph view
git log --oneline --graph --decorate --all
git log --oneline --graph --decorate --all is the bridge between the two worlds: an ASCII commit graph for your real repository. People who run it habitually stop being surprised by Git, because they see the graph before and after every operation, which is what the simulator trained.
Both tools are part of 50+ free DevOps games and simulators, and credit where due beyond our own work: Learn Git Branching is the classic interactive graph-manipulation tutorial and pairs well with everything above. Work the model, quiz it, then watch it in a real repo, and Git moves from "scary" to "predictable", which is all it ever needed to be.
Top comments (0)