Scenario library
Pick a starting history
Each scenario is a script of commands, not a snapshot — it replays when you open it, so what you see cannot disagree with what the commands actually do. Every one stops just before the interesting command and names it.
Integrate
Bringing a branch up to date with another, and what rebase does to the commits it moves.
A feature branch left behind main
The commonest shape. After the rebase, watch every feature commit change its hash — not because the content changed, but because the parent did, and the parent is part of the hash.
rebase main4 commitsOpen →A rebase that conflicts
Two branches changed the same line. The rebase stops part-way without moving a ref or writing an object — and your resolution is what decides the resulting commit hash.
rebase main3 commitsOpen →
Rewrite
Tidying your own history before anyone else sees it.
Recover
Getting back work that looks lost, because it almost never is.
Collaborate
History other people already have, and why rewriting it hurts them.
A branch other people already have
Here rebase is the wrong tool. Commits other people already hold must not be rewritten — use revert, which adds to the history instead of changing it.
revert HEAD~13 commitsOpen →Rebasing a branch you already pushed
This branch is already on origin. The rebase rewrites its commits, so the next push is rejected — and forcing it leaves the old commit on origin named by nothing. A colleague who already fetched still has it; anyone cloning today never will.
destructivepush origin main3 commitsOpen →