Loading

Loading sources… all files

    Overview

    Branchwise teaches Git from the command line. Every level presents a small repository rendered as a live commit graph alongside a target graph. As you type real Git commands, the graph updates after each operation, and the level clears as soon as your repository state matches the goal—regardless of which commands you used to get there.

    Its 34 lessons progress from git init and staging basics through branching, merging, conflict resolution, tags, and undoing changes, before tackling cherry-pick, interactive rebase, rebase --onto, fixup commits with --autosquash, stacked branches with --update-refs, remote workflows (fetch, pull, push, and --force-with-lease), git bisect, and worktrees. Each lesson runs against an actual working tree and repository, so commands behave and report errors just like standard Git.

    Made by
    wasmga.me
    Released
    2026

    Controls guide

    At the command line

    KeyAction
    TypeEnter Git commands or shell utilities: ls, cat, cd, echo, edit (appends a line to a file), vim, vi, nano, or code (opens a file in the text editor), mkdir, rm, and make test
    EnterExecute the command, or open the pause menu if the prompt is empty
    Up/DownCycle through command history
    Left/RightMove the cursor
    TabAutocomplete a command, branch, or filename; lists matches if ambiguous
    EscOpen the pause menu (press Tab while paused to move focus out to the page)
    Click/touchClick a commit node to insert its hash, or click a branch/tag label to insert its name

    In the file editor

    KeyAction
    Type, Enter, BackspaceEdit the file contents
    Arrow keysMove the cursor
    Esc/SaveSave the file and close the editor
    CancelClose without saving

    In the rebase to-do list

    KeyAction
    Up/DownSelect a commit line
    P, S, F, DSet action to pick, squash, fixup, or drop
    K/JReorder the selected line up or down
    EnterExecute the rebase
    Q/BackspaceAbort the interactive rebase without making changes

    Cheatsheet

    Built-in helper commands

    hint
    Show a hint for the current level
    solution
    Reveal a working solution (carries a larger score penalty than a hint)
    undo
    Revert the last state-changing command
    clear
    Clear the terminal output

    Naming commits

    HEAD, @
    The currently checked-out commit or branch
    main~2
    Two commits back along first-parent history
    main^2
    The second parent of a merge commit
    HEAD@{1}
    Where HEAD pointed one reflog entry ago
    @{u}
    The configured upstream branch (e.g., origin/main)
    -
    With switch or checkout: the previously checked-out branch

    Scoring

    1000
    Base score per level when solved in the par number of commands or fewer
    -100
    Penalty for each command beyond par
    -250
    Penalty per hint used (viewing the solution counts as two hints)

    Tips

    1. Run git status and git log --all whenever the commit graph looks unexpected—their terminal output mirrors the visual diagram.
    2. Dimmed nodes represent unreachable commits that no branch, tag, or HEAD points to. They still exist in the repository and can be recovered via the reflog.
    3. Levels only evaluate your final repository state, so any valid sequence of commands will pass; shorter solutions simply earn a higher score.
    4. You rarely need to type commit hashes by hand: click a commit node in the graph to insert its hash, or reference it relative to a branch using ~.