Resolve, Continue or Abort a Git Rebase
Why a rebase stops
In the second fixture both main and feature edit the same watering line from Water every 3. Main changes it to Water every 3 days; feature changes it to Water every 2. A second feature commit adds light.txt. Git stops at the conflicting replay step. HEAD may be detached during replay. Inspect the index and the current patch before choosing a resolution.
git statusgit ls-files -ugit rebase --show-current-patchResolve the intended behavior
For the fictional requirement, the correct final instruction is Water every 2 days. Edit notes.txt to that text, remove markers, stage the resolved file and inspect the staged diff. During a standard merge-backend rebase, ours means the rebased series so far (starting at the new base), while theirs refers to the commit being replayed. Do not select either blindly. Continue may open an editor; review its message, save and close it. More commits can produce more conflicts.
printf "Water every 2 days\n" > notes.txtgit add -- notes.txtgit diff --cached --checkgit diff --cachedgit rebase --continueCancel or skip deliberately
If uncertain, git rebase --abort cancels an active rebase and returns to the original branch/tip in the clean-start fixture; it discards in-progress resolution edits, so save any useful work externally first. git rebase --skip omits the current patch, which may discard intended changes. Use skip only after verifying that omission is appropriate. After either decision inspect history and status.
Practice
Find the separate continue, abort and skip scenarios in the report. Explain why skip retains the main watering interval but still replays the second feature commit. The abort and skip commands are alternatives to continuing, not the next steps after a successful rebase.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Resolve, Continue or Abort a Git Rebase — knowledge check
Reason about safe rebase and history integration.
What should happen before continuing after a conflict?
In merge-backend rebase, what does ours represent?
Which command shows the stopped patch?
What does skip risk?
What does abort do in the clean-start fixture?