davidandroid
Interactive Demo

Git Branching Sandbox

A small in-browser git model — commit, branch, checkout, merge, and rebase — so you can see exactly how the commit graph moves. No real repository involved, nothing to break.

Click a commit to check it out directly, click a branch tag to switch to it, or type commands in the terminal.

C1mainHEAD

Terminal

Type a git command below, e.g. git commit
$

Commit & branch

Branches

Merge & rebase

Applies to main

Tip: the terminal also understands HEAD, HEAD~2, and branch^.