我試着對我已經提交但未推送的代碼執行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並最終合併我的代碼?
小心一點。驗證你的工作變得有效,總是一個好主意。我通常的解決方案是在重新綁定之前將結果與分支頭部進行比較(除非您更改了補丁以解釋上游更改,並且希望這些補丁很簡單,以便您可以輕鬆驗證它們是否正確),否則應該沒有區別。目前我的環境似乎被竊聽,git正在擺脫類似於OP的git rebase。如果我「重新命名 - 繼續」,並且稍後再比較,我的autosquash修正會丟失。 – bambams