Learn Git Branching Unblocked

Solve 36 puzzles by typing git commands until your commit graph looks exactly like the goal.

Learn Git Branching is a puzzle game that teaches git, the version control tool used by programmers. On one side of the screen is a terminal where you type commands. On the other is a living diagram of commits and branches. Each level shows you a goal tree, and you solve it by typing git commands until your diagram matches.

It’s a hands-on way to understand what commands like commit, branch, merge and rebase really do. Instead of reading about them, you watch the tree change with every line you enter.

How a level works

Every level begins with a short lesson, often with a walk-through demo of the new command. Use the arrow keys or Enter to page through it, and Escape to close it.

Then it’s your turn. Type something like git commit, git checkout main or git branch bugFix and press Enter. The circles and labels on the diagram shift to show the result. A goal window floats on top so you can compare. Hide it while you work, and type show goal to bring it back.

When your tree matches the target, the level is marked as solved and the next one is offered. Use no more commands than the official answer and you get a gold star too.

What you’ll learn

There are 36 levels across two tabs. The Main tab has 20 levels split into five groups that run from the basics through moving work around to advanced topics. A second tab, Remote, holds 16 more levels about clone, fetch, pull and push, along with their options. Those levels simulate a second repository and commits from teammates.

Common mistakes

  • Losing track of HEAD. The branch label with an asterisk is where HEAD points, and new commits always go there.
  • Copying commit IDs. Relative references like main^ or HEAD~3 are faster and less error-prone.
  • Restarting too often. Type undo to reverse a single command instead of resetting the whole level.
  • Misreading the goal. Copied commits usually call for rebase or cherry-pick. If one commit has a pair of parents, you need a merge.

If you get stuck

Type hint for a clue or objective to reread the lesson. Typing sandbox lets you experiment freely with no goal, and levels opens the menu again. If all else fails, show solution demonstrates the answer, but the level won’t count as solved. The language of the interface can be changed using the language bar at the bottom of the screen.

Controls

ActionKeyboardMouse
Type a commandType anywhere on the page, then Enter—
Open the level menu and pick a levelType levels, then arrow keys and EnterClick a level number in the menu
Compare your tree with the targetType show goal (or hide goal)Click Show Goal on the level bar
Get a hint or read the lesson againType hint, or objectiveClick Instructions on the level bar
Take back the last commandType undo (or reset to start over)—
Page through a lesson or close itRight arrow or Enter for next, Left arrow for back, Escape to closeClick the arrows or the check mark

Learn Git Branching FAQ

Can I use Learn Git Branching on a phone or Chromebook?

A Chromebook or any computer with a keyboard works well. Phones and tablets don't, because you play entirely by typing, and the game shows a warning that touch devices can't enter commands.

Does it save my progress?

Yes. Levels you have solved are remembered in your browser between visits, and the level menu shows them. Matching the shortest known solution also earns a level a gold star.

Will it change files on my computer?

No. Everything runs in a simulated repository drawn in your browser. The commands act like real git, but nothing touches your actual files or projects.

How long does each level take?

Early levels are short, often just a few commands after reading the lesson. Later ones on rebasing and remotes take more thought. You can stop anytime, since solved levels stay recorded.

More games like Learn Git Branching

All puzzle games →