How to Get Started with Learn Git Branching

Updated

Open learngitbranching.js.org in a browser with JavaScript enabled, wait for the simulated terminal to load, and start with the introductory levels. The site runs a Git repository simulation entirely in your browser, so JavaScript is required — if you see "Loading..." instead of the terminal, enable JavaScript and refresh the page.

What you need before you start

  • A desktop or laptop browser with JavaScript turned on. The site itself states: "This application simulates a git repository in your browser, so you will need JS to use the app."
  • No Git installation, account, or local repository is required — everything happens in the browser simulation.
  • Basic familiarity with typing commands helps, but the early levels assume no prior Git branching experience.

Step-by-step: your first session

  1. Load the site. Go to learngitbranching.js.org. The page shows a loading state while the simulation initializes, then presents a terminal interface.
  2. Pick the terminal type. The interface offers a choice between Git and Hg (Mercurial) terminals. Choose Git unless you specifically want to practice Mercurial.
  3. Start the first level. Begin with the introductory levels rather than jumping to advanced branching or rebasing challenges. The early levels introduce one concept at a time.
  4. Type commands into the built-in terminal. Enter Git commands as instructed and watch the visualization update. The commit graph on screen reflects what your commands actually did, so you can see the effect of each command immediately.
  5. Verify your result. Each level states an objective. When your command sequence produces the required graph state, the level confirms completion and you can move on.
  6. Progress to unlock more. Completing levels unlocks more complex scenarios and practice objectives, including branching and rebasing challenges.

How the practice loop works

The core mechanic is a feedback loop: you enter a command, the simulated repository changes, and the visualization redraws the commit graph. That means a wrong command is visible immediately — you see the branch pointer move somewhere you didn't intend, or a commit land in the wrong place — and you can correct it in the same session without touching a real repository.

This is the main difference from reading docs or watching videos: you get to make the mistake and see its consequence rather than only reading about it.

Common snags

  • Stuck on "Loading..." — almost always JavaScript being disabled or blocked. Enable it and refresh.
  • Skipping ahead — advanced branching and rebasing levels assume the vocabulary and mental model built in the introductory ones. Working through them in order costs less time than backtracking.
  • Expecting a real repo — the terminal is a simulation. Commands affect the in-browser model, not any files on your machine.

Where to go next

Once the introductory levels are done, move into the branching and rebasing challenges. Those are the scenarios the site is best known for, and they build directly on the command-and-observe loop you practiced at the start.