主题分支中的`git rebase upstream-branch`发生致命错误

Ion*_*tan 5 git rebase

当我尝试将上游分支重新绑定到主题分支时,我遇到了问题.工作流程如下:

git checkout upstream
git pull origin upstream
git checkout topic
git rebase upstream
Run Code Online (Sandbox Code Playgroud)

结果如下:

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.
Run Code Online (Sandbox Code Playgroud)

昨天发生在我身上的事情,我已经完成了我的研究并没有发现任何东西,所以最后我用了git merge upstream而不是git rebase upstream事情有效.真正的问题是今天也出现了错误.由于昨天的合并,我已经与上游同步了.另外,自昨天以来,我没有修改过我的队友介绍的文件.

我的Git版本是1.5.6.5(并且真的不想在这台机器上更新它,我担心不必要的后果).

Ale*_*roß 10

我发现使用该--merge选项进行变基有助于这种情况.(尽管如此,Git还会做一些改变.)