A Real Conflict, Mid-Replay
CONFLICT (content): Merge conflict in spice-rack.md
error: could not apply <hash>... Add spice rack price guide
Git paused on the exact real commit it could not replay cleanly — everything before it already applied successfully.
Resolving and Continuing, One Commit at a Time
# edit spice-rack.md to the real, final content
git add spice-rack.md
git rebase --continue
Successfully rebased and updated refs/heads/feature/prices.
Only this one commit needed fixing — if more commits were queued behind it, each would replay (and potentially conflict) in turn, one at a time.
Why One Commit at a Time
A rebase conflict is scoped to a single, specific commit being replayed — resolving it only requires reconciling that commit's own real changes against the new base, not the entire branch's history at once. This is genuinely different from a merge conflict, which reconciles two complete histories in a single pass.
The Real Escape Hatch
git rebase master # a second, real conflict appears
git rebase --abort
Genuinely returns to the exact real state before the rebase was attempted — nothing partially applied, nothing lost.
feature/prices needs rebasing onto master's real, newer tip — but both sides genuinely touched the same line of spice-rack.md. This is a real rebase conflict: git pauses mid-replay, on the exact commit that cannot apply cleanly, and waits.
Resolving it means fixing that one commit and telling git to continue replaying the rest — genuinely different from a merge conflict, where the whole operation pauses once for everything at once. This lesson also deliberately triggers a second conflict just to abort it — the real, complete escape hatch back to exactly where you started.
git rebase --continue
Resumes a paused rebase after a conflict is resolved and staged, replaying the remaining queued commits. Confirmed directly in this lab: after resolving and staging spice-rack.md, --continue completed the rebase with "Successfully rebased and updated refs/heads/feature/prices."
git rebase --abort
Completely cancels an in-progress rebase, returning the branch to its exact real state before the rebase began — no partial application, nothing lost. Confirmed directly in this lab: after aborting, git status showed a genuinely clean working tree and the branch's log was completely unchanged.
Takeaways
- A rebase conflict pauses on exactly the one commit that cannot replay cleanly — not the whole branch at once
- git rebase --continue resumes replaying the remaining commits after the current conflict is resolved and staged
- A rebased commit gets a genuinely new hash — push --force-with-lease is required to update the remote
- git rebase --abort completely and cleanly returns to the exact state before the rebase began, no exceptions