git rebase --continue won't work
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
When git rebase --continue refuses to move forward, Git is usually waiting for you to resolve something first. The failure is rarely mysterious once you check the repository state carefully with git status.
Start with git status
During a rebase, git status tells you exactly what Git still needs. That should always be the first command you run.
Typical messages include unresolved conflicts, files that were fixed but not staged, or a note that the current patch became empty. Each of those states requires a different next step.
The Most Common Cause: Conflicts Are Not Staged
After resolving conflicts in your editor, Git still needs you to mark those files as resolved by staging them.
If multiple files were conflicted, stage all of them before continuing. Editing the conflict markers alone is not enough. Until the files are added to the index, Git still considers the rebase unresolved.
Another Common Cause: The Commit Became Empty
Sometimes the commit being replayed no longer changes anything because the same edits already exist on the new base. In that case, Git may tell you there is nothing to commit.
You usually have two choices:
Use --skip if the commit is genuinely redundant. If you intended to keep an empty commit for history reasons, create it explicitly and then continue:
The Editor May Be Blocking the Rebase
Sometimes git rebase --continue appears stuck because Git opened an editor for the rebased commit message and is waiting for you to save and close it. This often happens in terminal editors unfamiliar to the user.
If an editor window or terminal buffer opened, finish that step first. Git cannot continue until the editor exits successfully.
Inspect the Current Patch
If the reason is not obvious, inspect the patch Git is currently trying to apply:
That helps when a conflict message is vague or when you are not sure which commit is being replayed. Combined with git status, it usually makes the problem visible.
Abort and Restart If the State Is Too Messy
When the rebase state is badly confused and you do not trust the current working tree, aborting is safer than manually deleting Git's internal files.
That returns the branch to the state it had before the rebase started. After that, you can retry with a cleaner understanding of the conflict.
A Minimal Conflict-Resolution Workflow
This sequence covers the normal happy path:
Repeat the resolve, add, continue cycle until the rebase finishes. If Git reports another conflict on the next commit, that is expected. A rebase replays commits one by one.
Common Pitfalls
One pitfall is forgetting that git add is part of conflict resolution. Many users edit the files correctly but never stage them, so --continue keeps failing.
Another is assuming that "nothing to commit" means Git is broken. Often it just means the current commit became empty after replay and should be skipped.
Be careful with editor prompts. If Git launched an editor for the commit message, it is waiting on that process, not hanging.
Finally, avoid manually removing .git/rebase-merge or related internal directories unless you fully understand the consequences. git rebase --abort is the safer recovery path.
Summary
- Run
git statusfirst to see whygit rebase --continueis blocked. - After fixing conflicts, stage the resolved files with
git add. - Use
git rebase --skipwhen the current commit became empty and is no longer needed. - Check whether Git opened an editor and is waiting for you to finish the commit message step.
- If the rebase state is too messy, use
git rebase --abortand start again cleanly.

