INTERACTIVE LEARNING · GIT
Git branching, hands-on
Turn commands into a visible commit graph. Practise Git branches, merging, rebasing and remote collaboration on your phone.
Each circle is a commit, branch labels point to commits, and HEAD identifies your current position. Choose a level, read its objective, then use commands to make your repository match the target. Operations only change the simulated repository.
Start with your first commit
- Select Start level 1 to read the Git commit lesson, or choose a topic from Levels.
- Enter git commit and select Run. Watch the new commit and branch labels. Quick command buttons fill the input for you.
- Continue with branch, checkout, merge and rebase. Open Commands for a reference, and use undo to reverse a simulated operation.
What you will practise
- Commits and branches
- git commit creates a commit; git branch creates a branch pointing to a commit; git checkout switches to a branch or commit.
- Merging and rebasing
- git merge preserves and joins two histories; git rebase reapplies commits on a new base. Compare the graphs before and after each operation.
- Rewriting history
- Practise HEAD, relative references, reset, revert, cherry-pick and interactive rebase. Use ↑ ↓ to reorder commits on a phone without dragging.
- Remote collaboration
- Explore clone, fetch, pull and push in the remote levels, comparing local and remote branches. Simulated remotes do not require a GitHub connection.
Progress and Android
When storage is allowed, completed levels are saved in this browser on this device. Progress does not automatically sync across websites or browsers. Export JSON from Help and import it on another device. Importing replaces existing progress.
On Android, use this page’s HTTPS address. File manager HTML previews may disable scripts, leaving a blank page or unresponsive buttons. Offline files need a browser that runs local HTML scripts. Practice still works when storage is blocked; export your progress before closing.
Built-in levels, translations, fonts and scripts are included in one file. Once downloaded, practice works offline; external source and GitHub / Gist links still need a connection.
↓ Download standalone HTML (about 4 MB)Source and license
Based on Peter Cottle’s Learn Git Branching (MIT license). It retains the original Git simulation engine, levels and translations, adding touch input, mobile layouts, commit reorder buttons and storage compatibility.
