Git Internals
Rebase internals and the sequencer
Understand rebase as commit replay managed by the sequencer, making conflict handling and recovery decisions more predictable.
- Readers building a durable Git mental model
- Developers who keep running into history, ref, or recovery confusion
- Comfort reading basic Git output
- A rough idea of commits, branches, and HEAD
- Learning low-level terms without connecting them to commands
- Collapsing objects, refs, and working state into one concept
Rebase is ordered commit replay. The sequencer coordinates replay state and pause/resume behavior.
What the sequencer does
- computes replay set
- applies commits onto new base in order
- pauses on conflict
- resumes until queue is complete
Before rebase
main
ABCD
feature
BEF
After rebase
main
ABCD
feature
DE'F'
Why commit IDs change
Replayed commits are new objects with potentially different parents and metadata.
Meaning of --continue, --skip, --abort
continue: proceed with replay queueskip: drop current queued commitabort: discard replay and return to start point
Recovery-first pattern
Before experimenting further:
git reflog
git switch -c rescue/pre-rebase HEAD@{n}
Skipping blindly can silently lose meaningful patches. Decide commit-by-commit why skip is safe.
Good follow-up reads
recover after rebasecommit graphgit-rebase