rebase in progress. Cannot commit. How to proceed or stop (abort)?
Rebase doesn't happen in the background. "rebase in progress" means that you started a rebase, and the rebase got interrupted because of conflict. You have to resume the rebase
(git rebase --continue
) or abort it (git rebase --abort
).
As the error message from git rebase --continue
suggests, you asked git to apply a patch that results in an empty patch. Most likely, this means the patch was already applied and you want to drop it using git rebase --skip
.
I got stuck in 'rebase status', I got
On branch master
Your branch is up to date with 'origin/master'.
You are currently rebasing.
(all conflicts fixed: run "git rebase --continue")
nothing to commit, working tree clean
but running git rebase --skip
yielded error: could not read '.git/rebase-apply/head-name': No such file or directory
.
Running rm -fr ".git/rebase-apply"
helped.
Note: of course, do it only if you don't care about the rebase or if you're stuck on a previous rebase you don't want anymore.
Step 1: Keep going
git rebase --continue
Step 2: fix CONFLICTS then
git add .
Back to step 1, now if it says
no changes ..
then rungit rebase --skip
and go back to step 1If you just want to quit rebase run
git rebase --abort
Once all changes are done run
git commit -m "rebase complete"
and you are done.
Note: If you don't know what's going on and just want to go back to where the repo was, then just do:
git rebase --abort
Read about rebase: git-rebase doc
If git rebase --abort
doesnt work and you still get
error: could not read '.git/rebase-apply/head-name': No such file or directory
Type:
git rebase --quit