Loading

Loading sources… all files

    Overview

    Branchwise teaches git at a command line. Every level starts from a small repository drawn as a commit graph, with the goal drawn beside it. Type real git commands; the graph changes as each one runs, and the level is cleared the moment your repository matches the goal, however you got there.

    The 34 lessons run from git init and the staging area through branches, merges and their conflicts, tags and undoing work, to cherry-pick, interactive rebase, rebase --onto, fixup commits with --autosquash, stacked branches with --update-refs, fetching, pulling and pushing to a teammate's origin, force-with-lease, bisect and worktrees. Each lesson is a real repository on files of its own, so the commands answer as git does, errors included.

    Made by
    wasmga.me
    Released
    2026

    Controls guide

    At the command line

    KeyAction
    TypeWrite a command: git commands, plus ls, cat, cd, echo, edit (adds a line to a file), mkdir, rm and make test
    EnterRun the command; on an empty line, pause
    Up/DownEarlier commands
    Left/RightMove the caret
    Click/touchA commit adds its id to the command, a branch or tag its name

    In the rebase to-do list

    KeyAction
    Up/DownPick a line
    P, S, F, DPick, squash, fixup or drop it
    K/JMove the line up or down
    EnterStart the rebase
    Q/BackspaceLeave without changing anything

    Cheatsheet

    Not git

    hint
    A nudge for this level
    solution
    One way to clear it (costs more than a hint)
    undo
    Take back the last command that changed anything
    clear
    Empty the output

    Naming commits

    HEAD, @
    Where you are
    main~2
    Two commits back along first parents
    main^2
    A merge's second parent
    HEAD@{1}
    Where HEAD was one move ago (the reflog)
    @{u}
    The upstream of your branch, such as origin/main
    -
    With switch or checkout: where you were before

    Scoring

    1000
    Each level, using as few commands as the shortest way
    -100
    Each command more than that
    -250
    Each hint; solution counts as two

    Tips

    1. Run git status and git log --all whenever the graph surprises you: they print what the drawing shows.
    2. Faded commits are ones no branch, tag or HEAD reaches any more. They are still there, and the reflog can find them.
    3. A level only checks the end result, so any route to the goal counts; the score is better for a short one.
    4. Typing a commit's id is rarely needed: tap the commit, or count back from a branch with ~.