rebase in progress. Cannot commit. How to proceed or stop (abort)?

rebase in progress. Cannot commit. How to proceed or stop (abort)?
https://stackoverflow.com/questions/29902967/rebase-in-progress-cannot-commit-how-to-proceed-or-stop-abort

74
down vote
favorite
14
When I run:

git status
I see this:

rebase in progress; onto 9c168a5
You are currently rebasing branch ‘master’ on ‘9c168a5’.
(all conflicts fixed: run “git rebase –continue”)
nothing to commit, working directory clean
When I do:

ls git rev-parse --git-dir | grep rebase || echo no rebase
I see: rebase-apply

I can’t commit to origin.

git branch
Shows:

  • (no branch, rebasing master)
    develop
    master
    I’m stuck. I don’t know what to do? Does it really take this long to rebase? git rebase –continue doesn’t do anything. I don’t have anything in git status.. I’m just waiting for the rebase. What can I do?

UDATE: This is the output of: git rebase –continue

Applying: no message
No changes - did you forget to use ‘git add’?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.

When you have resolved this problem, run “git rebase –continue”.
If you prefer to skip this patch, run “git rebase –skip” instead.
To check out the original branch and stop rebasing, run “git rebase –abort”.
git add . has nothing.

git git-rebase
shareimprove this question
edited Jun 15 at 16:29

Alexis Wilke
9,33723669
asked Apr 27 ‘15 at 18:08

Joseph Chambers
8001824
add a comment
6 Answers
active oldest votes
up vote
138
down vote
accepted
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.

shareimprove this answer
edited Feb 23 ‘16 at 16:48

user1767754
8,39246273
answered Apr 27 ‘15 at 18:24

Matthieu Moy
5,88212142
I updated the post to include git rebase –continue per your request. – Joseph Chambers Apr 27 ‘15 at 20:11
OK, then “it rebase –continue doesn’t do anything” was inaccurate. You should have written “git rebase –continue errors out as follows …” to get help. – Matthieu Moy Apr 30 ‘15 at 14:37
2
The documentation of this very badly, it keeps repeating that you ‘git rebase –continue’ and you will end up in an infinite way of saying that. – Jean-Paul Apr 18 ‘16 at 12:21
2
git rebase –skip did it! – Borzh Nov 3 ‘17 at 20:39
As this is a question for relative beginners (like me) i thought its worth mentioning all this talk of run this or that - requires opening a new terminal and going back into the repo…nothing would run in my instance of this issue without doing that, – Kdean571 Nov 16 ‘17 at 0:27
add a comment
up vote
5
down vote
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.

shareimprove this answer
answered Apr 27 ‘15 at 18:28

Schleis
23.2k34570
add a comment
up vote
3
down vote
I got into this state recently. After resolving conflicts during a rebase, I committed my changes, rather than running git rebase –continue. This yields the same messages you saw when you ran your git status and git rebase –continue commands. I resolved the issue by running git rebase –abort, and then re-running the rebase. One could likely also skip the rebase, but I wasn’t sure what state that would leave me in.

$ git rebase –continue
Applying:
No changes - did you forget to use ‘git add’?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.

When you have resolved this problem, run “git rebase –continue”.
If you prefer to skip this patch, run “git rebase –skip” instead.
To check out the original branch and stop rebasing, run “git rebase –abort”.

$ git status
rebase in progress; onto 4df0775
You are currently rebasing branch ‘’ on ‘4df0775’.
(all conflicts fixed: run “git rebase –continue”)

nothing to commit, working directory clean
shareimprove this answer
edited Dec 1 ‘15 at 15:11
answered Dec 1 ‘15 at 15:06

jsears
2,75912331
In addition of –abort (+1), you now have –quit (stackoverflow.com/a/41363262/6309) – VonC Dec 28 ‘16 at 13:40
add a comment
up vote
1
down vote
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 run git rebase –skip then 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.

shareimprove this answer
answered Aug 9 at 17:44

Ani Menon
14.8k55272
add a comment

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值