Learn Git Visually

Every Git command, animated step by step on the same small project — so you see what it really does to your files, your history and your remote.

  • 72 commands
  • 275 options
  • 15 scenarios
  • 6 languages
$echo "cart.pu
YOUR FILES — ONE FILE, THREE PLACESWorking diryour diskStagingnext commitHEADlast commitadd ›commit ›GITUALIZE☁ ORIGIN — github.com/acme/shop (another repository)YOUR REPOSITORY — .git on your laptop2e039acAdd homepage2e039ac897849007af489a58ee9eec107a21974e Add homepageb272b3aSet up projectb272b3abaca08f2f1c56c0562679f66a61035535 Set up project129c2dbInitial commit129c2db06bfe68f8469dc82e6e05d1c03d1f768c Initial commit2e039acAdd homepage2e039ac897849007af489a58ee9eec107a21974e Add homepageb272b3aSet up projectb272b3abaca08f2f1c56c0562679f66a61035535 Set up project129c2dbInitial commit129c2db06bfe68f8469dc82e6e05d1c03d1f768c Initial commitmainmain: a movable label on a commitorigin/mainorigin/main: your LOCAL bookmark of where origin's branch was at your last fetch/pushHEADHEAD → the branch you are onmainmain: as it exists ON originREADME.mdunchangedapp.jsunchangedindex.htmlunchangedv1v1v1v1v1v1v2v2v2HEAD → main → 2e039ac “Add homepage”

Live: the Git simulator runs these four commands on a loop.

Everything Git hides, on screen

Every picture below is drawn live by the same simulator that runs the lessons — nothing is illustrated by hand.

The three trees

See where every file lives

Each file shows its version on your disk, in the staging area and in the last commit — watch git add and git commit move it from one to the next.

See it in a lesson →
YOUR FILES — ONE FILE, THREE PLACESWorking diryour diskStagingnext commitHEADlast commitadd ›commit ›GITUALIZEYOUR REPOSITORY — .git on your laptop2e039acAdd homepage2e039ac897849007af489a58ee9eec107a21974e Add homepageb272b3aSet up projectb272b3abaca08f2f1c56c0562679f66a61035535 Set up project129c2dbInitial commit129c2db06bfe68f8469dc82e6e05d1c03d1f768c Initial commitmainmain: a movable label on a commitHEADHEAD → the branch you are onREADME.mdunchangedapp.jsstagedindex.htmlmodifiedlogin.jsuntrackedv1v1v1v2v2v1v3v2v2v1——HEAD → main → 2e039ac “Add homepage”
History

Branches and merges, drawn as they happen

New commits appear, branch labels slide, a merge joins two lines. Rebase shows the old commits fading as the new ones take their place.

See it in a lesson →
YOUR FILES — ONE FILE, THREE PLACESWorking diryour diskStagingnext commitHEADlast commitadd ›commit ›GITUALIZEYOUR REPOSITORY — .git on your laptop16a965cMerge feature…16a965c6f96f4a7acb902f45bf46455f09ccff30 Merge feature/logina2b8b5dDocument inst…a2b8b5df5d4f38ac299e9b25e95ebcc998bfb7fa Document install2e039acAdd homepage2e039ac897849007af489a58ee9eec107a21974e Add homepageb272b3aSet up projectb272b3abaca08f2f1c56c0562679f66a61035535 Set up project129c2dbInitial commit129c2db06bfe68f8469dc82e6e05d1c03d1f768c Initial commit960123aCall login on…960123a1d58a1488381355be004d5a6ff601640c Call login on load19d2019Add login page19d2019870aaae1bc0c6d1a5aa8cc1f8d76c6473 Add login pagefeature/loginfeature/login: a movable label on a commitmainmain: a movable label on a commitHEADHEAD → the branch you are onREADME.mdunchangedapp.jsunchangedindex.htmlunchangedlogin.jsunchangedv2v2v2v2v2v2v2v2v2v1v1v1HEAD → main → 16a965c “Merge feature/login”
Remotes

Your laptop and GitHub, side by side

fetch, pull and push show exactly what travels between your repository and origin — and why a push gets rejected.

See it in a lesson →
YOUR FILES — ONE FILE, THREE PLACESWorking diryour diskStagingnext commitHEADlast commitadd ›commit ›GITUALIZE☁ ORIGIN — github.com/acme/shop (another repository)YOUR REPOSITORY — .git on your laptop2b4c917Add to cart2b4c91785b581691dd1665ce1839576f03d6ac23 Add to cart2e039acAdd homepage2e039ac897849007af489a58ee9eec107a21974e Add homepageb272b3aSet up projectb272b3abaca08f2f1c56c0562679f66a61035535 Set up project129c2dbInitial commit129c2db06bfe68f8469dc82e6e05d1c03d1f768c Initial commit2e039acAdd homepage2e039ac897849007af489a58ee9eec107a21974e Add homepageb272b3aSet up projectb272b3abaca08f2f1c56c0562679f66a61035535 Set up project129c2dbInitial commit129c2db06bfe68f8469dc82e6e05d1c03d1f768c Initial commitorigin/mainorigin/main: your LOCAL bookmark of where origin's branch was at your last fetch/pushmainmain: a movable label on a commitHEADHEAD → the branch you are onmainmain: as it exists ON originREADME.mdunchangedapp.jsunchangedindex.htmlunchangedv1v1v1v2v2v2v2v2v2HEAD → main → 2b4c917 “Add to cart”
Recovery

Nothing disappears silently

A commit left behind by a reset stays on screen, dashed, until the reflog brings it back — so undoing mistakes stops being scary.

See it in a lesson →
YOUR FILES — ONE FILE, THREE PLACESWorking diryour diskStagingnext commitHEADlast commitadd ›commit ›GITUALIZEYOUR REPOSITORY — .git on your laptopb272b3aSet up projectb272b3abaca08f2f1c56c0562679f66a61035535 Set up project129c2dbInitial commit129c2db06bfe68f8469dc82e6e05d1c03d1f768c Initial commit2e039acAdd homepage2e039ac897849007af489a58ee9eec107a21974e Add homepage (unreachable — no branch points here; the reflog still remembers it)mainmain: a movable label on a commitHEADHEAD → the branch you are onREADME.mdunchangedapp.jsunchangedindex.htmlunchangedv1v1v1v1v1v1v1v1v1HEAD → main → b272b3a “Set up project”
Terminal

Real output, not screenshots

Every command runs in a Git simulator verified against real Git, so the terminal shows what Git itself would print.

See it in a lesson →
~/shop — bashgit fetch
# meanwhile… Sam pushes 7f94dc7 “Update README” to origin/main
$ git fetch
remote: Enumerating objects: 5, done. remote: Counting objects: 100% (5/5), done. remote: Compressing objects: 100% (1/1), done. remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0) Unpacking objects: 100% (3/3), 312 bytes | 312.00 KiB/s, done. From github.com:acme/shop 2e039ac..7f94dc7 main -> origin/main

Four ways to learn

Commands

72 commands · 275 options

One page per command: a full animated lesson, then every option with its own short demo and a recommendation.

--force-with-leaseGit ≥ 1.8.5Recommended
▷ Show Visualization

Scenarios

15 scenarios

Real situations from start to finish: your first commit, a merge conflict, a bad reset, a hotfix on a release.

1Start the feature
Branch
$ git switch -c feature/login
Login page
$ echo "export function login() {}" > login.js && git add login.js && git commit -m "Add login page"
Wire it up
$ echo "login()" >> app.js && git commit -am "Call login on load"

Workflows

GitHub flow · Git flow · Trunk-based · Forking

How teams actually work, with the rules quoted from their sources and a team of four playing them out.

YOUR FILES — ONE FILE, THREE PLACESWorking diryour diskStagingnext commitHEADlast commitadd ›commit ›GITUALIZE☁ ORIGIN — github.com/acme/shop (another repository)YOUR REPOSITORY — .git on your laptop2987563Merge pull re…2987563bea62405d138bad2642c5cdf47c0ced7d Merge pull request #12 from acme/add-cart-limit2e039acAdd homepage2e039ac897849007af489a58ee9eec107a21974e Add homepageb272b3aSet up projectb272b3abaca08f2f1c56c0562679f66a61035535 Set up project129c2dbInitial commit129c2db06bfe68f8469dc82e6e05d1c03d1f768c Initial commit1bf6e0fDocument the …1bf6e0fe85eaa96e17bc60d039223cad86b071fc Document the cart limit509eb2aLimit cart si…509eb2a230245b72689c79c123c412eb6d8613d3 Limit cart size2987563Merge pull re…2987563bea62405d138bad2642c5cdf47c0ced7d Merge pull request #12 from acme/add-cart-limit2e039acAdd homepage2e039ac897849007af489a58ee9eec107a21974e Add homepageb272b3aSet up projectb272b3abaca08f2f1c56c0562679f66a61035535 Set up project129c2dbInitial commit129c2db06bfe68f8469dc82e6e05d1c03d1f768c Initial commit1bf6e0fDocument the …1bf6e0fe85eaa96e17bc60d039223cad86b071fc Document the cart limit509eb2aLimit cart si…509eb2a230245b72689c79c123c412eb6d8613d3 Limit cart sizemainmain: a movable label on a commitorigin/mainorigin/main: your LOCAL bookmark of where origin's branch was at your last fetch/pushHEADHEAD → the branch you are onmainmain: as it exists ON originREADME.mdunchangedapp.jsunchangedindex.htmlunchangedv1v1v1v3v3v3v2v2v2HEAD → main → 2987563 “Merge pull request #12 from acme/add-cart-limit”

Playground

Free play

Type any command on the same project and watch it happen. Hints suggest what to try next.

$try any command… (help)✎ Edit a file
Stuck? Likely next commands
cat index.html
See the conflict: yours is between <<<<<<< and =======, theirs below
code index.html
Resolve it in the editor (keeps both sides, removes the markers)
git add index.html
After resolving: tells Git “index.html is fixed”
💡

Did You Know?

Made to be read by everyone

  • Six languages — English · Français · Español · Português · Deutsch · العربية
  • Light or dark — and four colour themes for the visualizations.
  • Colour-blind mode — blue and orange instead of green and red, everywhere.
  • Text size — from 90% to 130%, without breaking the layout.

All of it lives behind the gear button in the header.