rebase in progress. Cannot commit. How to proceed or stop (abort)?
Solution 1:
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
.
Solution 2:
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
Solution 3:
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.
Solution 4:
-
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 1 -
If 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
Solution 5:
You told your repository to rebase. It looks like you were on a commit (identified by SHA 9c168a5) and then did git rebase master
or git pull --rebase master
.
You are rebasing the branch master onto that commit. You can end the rebase via git rebase --abort
. This would put back at the state that you were at before you started rebasing.