Peter Cottle

Learn Git Branching

Peter Cottle's interactive git visualiser — type real commands, watch the commit graph move. Branching, rebase and remotes across seven level sequences.

FreeBeginner0–2 hoursEnglishDevOps
Go to course

Opens on Peter Cottle — a direct link, no affiliate tracking.

Course overview

Peter Cottle built a git repository visualiser, wrapped a set of puzzles around it, and accidentally created the best git teaching tool that exists. You type real git commands into a terminal, and a commit graph animates beside it — nodes for commits, lines for branches, an arrow showing where HEAD is pointing. The abstraction that makes git confusing simply stops being abstract.

It's organised as sequences of levels plus a free-form sandbox where you can experiment with no goal at all. Each level tracks how many commands you used, so you can go back and try to match the optimal solution — the site calls it git golf.

What the levels cover

  • Introduction — commits, branching, merging, and a first look at rebase
  • Ramping Up — detached HEAD, relative refs with caret and tilde, reversing changes
  • Push & Pull — clone, remote branches, fetch, pull, faking teamwork, push, diverged history, locked main
  • To Origin And Beyond — merging with remotes, remote tracking, and the full argument forms of push, pull and fetch
  • Moving Work Around — cherry-pick and interactive rebase
  • A Mixed Bag — grabbing single commits, juggling commits, tags, git describe
  • Advanced Topics — repeated rebasing, multiple parents, branch spaghetti

What it deliberately isn't

This teaches the commit graph. It does not teach git as you actually use it: there are no files, no working directory, no staging area worth the name, no merge conflicts to resolve, no .gitignore, no stash in daily use, no pull requests, no code review. You can complete every level and still not know what to do when git tells you your merge has conflicts — which is, realistically, the situation people most need help with.

The sandbox also runs a simulated git, not the real thing, so behaviour is close but not identical to your terminal.

Who it's for

Anyone who uses git by memorised incantation and panics when something goes sideways. The remote sequences in particular are the clearest explanation of fetch versus pull anywhere. Skip it if you've never made a commit — start with a real repository first, then come here to understand what you did. Skip it too if your problem is conflicts or workflow rather than branching.

Our take

Close to perfect at its one job, and its one job is narrower than people assume. An hour here will permanently fix your mental model of branches and rebasing. It will not make you comfortable with git day to day, because the messy parts — conflicts, half-staged files, a rebase you started and can't finish — are exactly the parts a graph simulator can't show you.

At a glance

Price
Free
Level
Beginner
Time to complete
0–2 hours
Language
English
Certificate
Not offered
Taught by
Peter Cottle
Category
DevOps
Last checked
26 Aug 2026

Topics covered

  • git
  • interactive
  • visual

More like this

Other courses covering the same subjects.

Docker

Free

Docker: Get Started Guide

Docker's official four-step introduction — install, run your first container, build an image, push it to Docker Hub. Deliberately narrow,…

Beginner0–2 hrs
View →

Reviews

No reviews yet

Took this course? Share what you thought.