[英]Fatal error with `git rebase upstream-branch` in topic branch
當我嘗試將上游分支重新綁定到主題分支時,我遇到了問題。 工作流程如下:
git checkout upstream
git pull origin upstream
git checkout topic
git rebase upstream
結果如下:
First, rewinding head to replay your work on top of it...
Applying Refactored database access and added logging
error: patch failed: path/to/file1.ext:21
error: path/to/file1.ext: patch does not apply
error: path/to/file2.ext:3
error: path/to/file2.ext: patch does not apply
fatal: mode change for path/to/file3.ext, which is not in current HEAD
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001.
昨天發生在我身上,我已經完成了我的研究並沒有發現任何東西,所以最后我使用git merge upstream
而不是git rebase upstream
,事情很有效。 真正的問題是今天也出現了錯誤。 由於昨天的合並,我已經與上游同步了。 另外,自昨天以來,我沒有修改過我的隊友介紹的文件。
我的Git版本是1.5.6.5(並且真的不想在這台機器上更新它,我擔心不必要的后果)。
我發現使用--merge
選項進行變基在這種情況下--merge
幫助。 (盡管如此,Git還會做一些改變。)
我有同樣的事情,結果是由在消息中有差異的提交消息引起的。
也許試試:git log --grep ++
......看看是不是..
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.