2014-03-18 116 views
8

我试着对我已经提交但未推送的代码执行rebase,因为我听说可能会影响我正在处理的内容的来源发生了一些变化。这里是我得到的:Git rebase因冲突失败,但没有冲突

$ git rebase origin/thor-develop 
First, rewinding head to replay your work on top of it... 
Applying: PH-2127: F193: SYO for Signed in User 
Using index info to reconstruct a base tree... 
M  js/angular/localization/StoreListCtrl.js 
M  templates/default_site/site_embed.group/html_header.html 
<stdin>:17: trailing whitespace. 

<stdin>:73: trailing whitespace. 

<stdin>:77: trailing whitespace. 

<stdin>:78: trailing whitespace. 
          $scope.address_dropdown = addressStore.getTop($scope.my_occasion, 3); 
<stdin>:79: trailing whitespace. 

warning: squelched 16 whitespace errors 
warning: 21 lines add whitespace errors. 
Falling back to patching base and 3-way merge... 
Auto-merging templates/default_site/site_embed.group/html_header.html 
Auto-merging js/angular/localization/StoreListCtrl.js 
CONFLICT (content): Merge conflict in js/angular/localization/StoreListCtrl.js 
Failed to merge in the changes. 
Patch failed at 0001 PH-2127: F193: SYO for Signed in User 

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

我们使用Tortoise Git作为前端编辑器,所以我进入了Resolve工具。它通常会显示差异,当然这是不错的,而冲突则不然。它显示我在引用的文件(StoreListCtrl.js)中完全没有冲突。显然存在差异,但根本没有冲突。这是什么意思,我该如何解决这个问题,以便我可以完成rebase并最终合并我的代码?

+0

小心一点。验证你的工作变得有效,总是一个好主意。我通常的解决方案是在重新绑定之前将结果与分支头部进行比较(除非您更改了补丁以解释上游更改,并且希望这些补丁很简单,以便您可以轻松验证它们是否正确),否则应该没有区别。目前我的环境似乎被窃听,git正在摆脱类似于OP的git rebase。如果我“重新命名 - 继续”,并且稍后再比较,我的autosquash修正会丢失。 – bambams

回答

7

解析工具可能会自动为您解决冲突。这发生在我身上(并使我感到困惑)。在这种情况下,您可以直接前往git rebase --continue

完整的清单是:

  • 如果git status显示任何未上演的变化:
    • 如果这些文件具有V形<<<>>>标记冲突:
      • 解决冲突和保存文件
    • 现在阶段所有未上演的变化与git add:这标志着冲突,解决
  • 现在解决任何冲突,并标明:使用git rebase --continue
+0

这似乎发生了。把我从太聪明的软件中拯救出来。 – EmmyS

+0

TortoiseGit不会调用'git rebase --continue'。它有UI来解决冲突,你点击Continue按钮来运行'git commit'并选择下一个提交。 – linquize

+0

我没有说它已经继续了rebase,但它已经解决了冲突。 – Useless