删除/修改冲突后,Git rebase不会继续 [英] Git rebase will not continue after a delete/modify conflict
问题描述
git结帐阶段
git rebase master
有时我删除了两个文件,然后根据GIT修改了这两个文件。
警告:太多文件,跳过不精确的重命名检测
CONFLICT(删除/修改):test-recommendation-result.php在HEAD中删除并在[Bug]中修改修复测试推荐程序。版本[Bug]修复树中留下的test-recommendation-result.php的测试推荐。
CONFLICT(删除/修改):在HEAD中删除test-recommendation.php并在[Bug]修改测试推荐器中修改。版本[Bug]修正树中留下的test-recommendation.php的测试推荐器。
未能在更改中合并。
修补程序在0015失败。
我想说是啊,继续并删除这些文件所以....
git rm test-recommendation-result.php
git rm test-recommendation .php
git rebase --continue
Git说:
应用[Bug]修复测试推荐者
没有变化 - 你忘了使用'git add',愚蠢?
当你解决这个问题时,运行git rebase --continue。
如果您希望跳过此修补程序,请运行git rebase --skip。
要恢复原始分支并停止重新分配运行git rebase --abort。
我说:不要打电话给我愚蠢,只是做我告诉过你的事!
我们现在陷入僵局。谁是对的,我该如何解决这个问题?
git rebase --continue
。这应该添加所有更改 - 包括删除文件,然后继续。 无法保证提交没有其他文件没有冲突,应该合并。 git rebase --skip
会丢失这些文件。你不希望那样。
希望这会有帮助。
I'm in the middle of a rebase of my master to a stage branch
git checkout stage
git rebase master
At some time I deleted two files then modified the two files according to GIT.
warning: too many files, skipping inexact rename detection
CONFLICT (delete/modify): test-recommendation-result.php deleted in HEAD and modified in [Bug] Fix test recommender. Version [Bug] Fix test recommender of test-recommendation-result.php left in tree.
CONFLICT (delete/modify): test-recommendation.php deleted in HEAD and modified in [Bug] Fix test recommender. Version [Bug] Fix test recommender of test-recommendation.php left in tree.
Failed to merge in the changes.
Patch failed at 0015.
I want to say "Yeah git, go ahead and delete those files" so ....
git rm test-recommendation-result.php
git rm test-recommendation.php
git rebase --continue
Git says:
Applying [Bug] Fix test recommender
No changes - did you forget to use 'git add', Stupid?
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
I say "Don't call me "Stupid" and just do what I told you to do!"
We are now at a standoff. Who is right and how do I fix this?
do git add -A
followed by git rebase --continue
. This should add all changes - including your removal of the files and then continue.
There is no guarantee that the commit didn't have other files that did not conflict and should be merged. git rebase --skip
would lose those files. You don't want that.
Hope this helps.
这篇关于删除/修改冲突后,Git rebase不会继续的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!