代码之家  ›  专栏  ›  技术社区  ›  Ionuț G. Stan

主题分支中的“git rebase upstream branch”出现致命错误

  •  5
  • Ionuț G. Stan  · 技术社区  · 15 年前

    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 一切顺利。真正的问题是这个错误今天也出现了。由于昨天的合并,我已经和上游同步了。而且,我从昨天开始就没有修改队友介绍的文件。

    2 回复  |  直到 15 年前
        1
  •  10
  •   Alexander Groß    15 年前

    我发现 --merge 在这种情况下,选项会有所帮助(尽管如此,Git还是会做一次重新设置基础的工作。)

        2
  •  0
  •   matiu    13 年前

    也许可以试试:git log——grep++

    ... 看看是不是。。

    推荐文章