我是靠谱客的博主 优雅巨人,最近开发中收集的这篇文章主要介绍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

最后

以上就是优雅巨人为你收集整理的rebase in progress. Cannot commit. How to proceed or stop (abort)?的全部内容,希望文章能够帮你解决rebase in progress. Cannot commit. How to proceed or stop (abort)?所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(56)

评论列表共有 0 条评论

立即
投稿
返回
顶部