Learn Git Branching Unblocked
Real git commands, a live commit graph and 36 puzzles that make branching finally click.
What is Learn Git Branching?
Learn Git Branching is an interactive tutorial that treats git as a puzzle. You type real git commands into a simulated terminal, and a diagram of commits and branches updates after each one. The goal in every level is to make your tree match a target tree, ideally in as few commands as possible.
- Category
- Puzzle Games
- Players
- 1 player
- Plays on
- Desktop / Chromebook
- Input
- Keyboard, Mouse
- Made by
- Peter Cottle
- Checked
Learn Git Branching is the rare coding tutorial that feels like a puzzle game. A terminal sits on one side of the screen and a live graph of commits fills the other, with circles for commits and labels for branches. Each level shows you a target shape, and you type actual git commands until your graph matches it. Peter Cottle built it to make branching, merging and rebasing visible, and on FreezeNova you can play it unblocked in any desktop browser without installing git at all.
From First Commit to Remote Repos
Every level opens with a short lesson. Many include an animated demo of the new command, so you see exactly what git rebase or git merge does to the tree before you try it.
Close the lesson and start typing. Something like git branch feature, git checkout feature or git commit redraws the diagram immediately. A goal window floats on top showing the shape you need; hide it while you work and bring it back to compare. When the trees match, the level is marked solved and the next one is offered. Matching it in as few commands as the reference answer earns a gold star.
The 36 levels are split across two tabs:
- Main (20 levels) in five sets: an introduction, ramping up, moving work around, a mixed bag and advanced topics.
- Remote (16 levels) on clone, fetch, pull, push and the arguments that change their behavior.
Learn Git Branching controls
| To do this | Keyboard | Mouse |
|---|---|---|
| Run a command | Type anywhere on the page, then Enter | — |
| Browse and choose levels | Type levels, then arrow keys and Enter | Click a level number in the menu |
| Peek at the target tree | Type show goal (or hide goal) | Click Show Goal on the level bar |
| Ask for a nudge or reread the lesson | Type hint, or objective | Click Instructions on the level bar |
| Reverse your last command | Type undo (or reset to start over) | — |
| Move through or dismiss a lesson | Right arrow or Enter for next, Left arrow for back, Escape to close | Click the arrows or the check mark |
Getting Unstuck
The hardest part for most people is not the syntax, it is knowing where HEAD is. Watch for the asterisk next to a branch name: that is where your next commit will land. If you commit and the new circle appears somewhere unexpected, you were on the wrong branch.
Relative references save a lot of squinting. main^ means one commit before main, and HEAD~3 means three back. They are faster than reading commit IDs off the graph.
Before typing anything on a hard level, study the goal. Copied commits with a prime mark suggest git rebase or git cherry-pick. A commit with two parent lines means a merge happened.
When an idea fails, type undo instead of resetting the whole level. And if you want to experiment without a goal, sandbox drops you into a free practice tree.
Only use show solution as a last resort, since a level solved that way does not count.
Who Should Play
Computer science students, bootcamp learners and new developers will get the most out of it, but anyone who has ever been confused by a merge conflict will find the visual model eye-opening. You need a keyboard, so it is a laptop or Chromebook game. If you enjoy learning through puzzles, follow up with SQL Detective Mystery or program a robot in Robot Coder.
Learn Git Branching: questions players ask
Can Learn Git Branching break anything on my computer?
No. The repository is simulated inside the web page. Nothing is written to your disk and no real git install is needed, yet the commands respond the way real git does.
How do I get a gold star on a level?
Match the goal tree using no more commands than the reference solution. Solving with extra steps still counts as a pass, so you can come back later and tighten your answer.
Is it useful for a real job or class?
Yes. The commands are the same ones used every day on software teams, including rebase, cherry-pick, fetch and push. Many people use it to get comfortable before working on a shared repository.
Does it work on a tablet or phone?
Not well. Every action is a typed command, and the game itself says it cannot accept input on phones and tablets. Play it on a laptop, desktop or Chromebook with a keyboard.
Will my progress be saved?
Solved levels are stored in your browser, so the menu shows your checkmarks and stars next time you visit on the same device.
Credits and license
Learn Git Branching was created by Peter Cottle and released as open source. FreezeNova hosts a lightly adapted copy on its own server, together with the original license file.
- Source code: github.com/pcottle (original project)
- Code license: MIT
- Art & audio: MIT (graphics drawn in code); Font Awesome icons, CC BY 4.0 / CC BY 3.0, fonts SIL OFL 1.1
- Our changes: Yes. Analytics, promo banners, share buttons and outbound links are gone, and loading levels from GitHub is switched off. The level set and the git simulator are unchanged.