Git field manual / signal 01

Make history
read forward.

Rebase replays your work onto a new base. The files can end up identical to a merge, but the story becomes a clean, reviewable line.

Why rebase?

01 / BENEFITS
01

Cleaner reviews

Reviewers follow one sequence of intent instead of detouring through synchronization merges.

02

Useful commits

Interactive rebase lets you reorder, rename, combine, or remove local commits before sharing them.

03

Easier archaeology

A linear history makes git log, bisecting, and reverting easier to reason about later.

Merge or rebase?

02 / LIVE GRAPH
Drag the timeline to replay the graph
Two branches have diverged.

How to use it

03 / SAFE ROUTE
$ git status
$ git fetch origin
$ git rebase origin/main

# fix a conflict, then:
$ git add <resolved-files>
$ git rebase --continue

# or safely abandon:
$ git rebase --abort
Preflight

Commit or stash your work. Fetch the latest remote state. Confirm you are on your feature branch.

Replay

Run git rebase origin/main. Git applies each of your commits onto the updated main branch.

Resolve

Fix conflicts one commit at a time, stage the resolutions, and continue. Abort returns exactly to the starting point.

Publish

If the branch was already pushed, use git push --force-with-lease, never plain --force.

Shape the story

04 / INTERACTIVE

Try an interactive plan. Change actions or move commits, then inspect the command Git would open.