Git 产生 "BUG: There are unmerged index entries"

标签 git debugging merge fatal-error

做的时候:

git merge some-branch

我明白了

BUG: There are unmerged index entries:
BUG: 3 docfatal: Bug in merge-recursive.c

不确定这意味着什么,但看起来比平时更出乎意料。我该怎么办?有一些清理命令可以帮助我吗?

编辑

更糟糕的是,这个错误实际上是沿着我的源代码的一个版本传播的。由于 some-branch 最初只是我的本地工作,所以我将其推送到远程服务器上。然后克隆了一个新的存储库,并尝试在此副本上 merge 上述分支并得到相同的消息。

编辑 2

我使用 GIT_MERGE_VERBOSITY=5 并得到:

$> export GIT_MERGE_VERBOSITY=5; git merge origin/funkload 
Merging:
a1ef5a2 Uaktualniony INSTALL.
virtual origin/funkload
found 2 common ancestor(s):
d2eb442 Resources py.
119871b Nowy commit w doc.
  Merging:
  d2eb442 Resources py.
  119871b Nowy commit w doc.
  found 1 common ancestor(s):
  62f4183 Poprawiony bug w obsłudze linków do resources, które są null.
  Removing doc/concept/agreement.lyx
  Removing doc/concept/agreement.pdf
  Removing doc/concept/concept.lyx
  ...
  Removing druglo-doc
  Removing src/db/fixtures/initial.json
  Skipped src/druglo/backend/actions/tests/fight.py (merged same as existing)
  Auto-merging src/druglo/backend/characters/models/behaviours.py
  CONFLICT (content): Merge conflict in src/druglo/backend/characters/models/behaviours.py
  Auto-merging src/druglo/backend/players/models/players.py
  Auto-merging src/druglo/backend/worlds/resources.py
  CONFLICT (content): Merge conflict in src/druglo/backend/worlds/resources.py
  Auto-merging src/druglo/common/integrity/webservices/resources.py
  CONFLICT (content): Merge conflict in src/druglo/common/integrity/webservices/resources.py
  Removing src/druglo/frontend/cityscreen/models.py
  Removing src/druglo/frontend/forms.py
  Removing src/druglo/frontend/mainscreen/models.py
  Removing src/druglo/frontend/models.py
  CONFLICT (directory/file): There is a directory with name doc in Temporary merge branch 1. Adding doc as doc~Temporary merge branch 2
BUG: There are unmerged index entries:
BUG: 3 docfatal: Bug in merge-recursive.c

注意:我最近将我的一个目录移到了一个单独的子模块中。现在我因此遇到了很多冲突。该错误似乎与此有关。

最佳答案

该错误消息是 introduced in January 2010 ,为了帮助调试这种情况,Junio C. Hamano 建议将 GIT_MERGE_VERBOSITY 设置为 5:

We might want to suggest the user to set GIT_MERGE_VERBOSITY to 5 and re-run the merge in the message.
At least we will know which part of process_renames() or process_entry() functions is not correctly handling the unmerged paths, and it might help us diagnosing the issue.

OP julkiewicz报告

CONFLICT (directory/file): 
There is a directory with name doc in Temporary merge branch 1. 
Adding doc as doc~Temporary merge branch 2

这允许隔离导致此错误消息的目录。

关于Git 产生 "BUG: There are unmerged index entries",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6761229/

相关文章:

git - 如何在 Git 服务器上插入 SSH key (仅限 git-shell 访问)

php - 更新实时网站的过程

git - git 的 merge 冲突解决是否比其他 SCM 和 merge 工具更高效?

javascript:使用 EcmaScript 6/immutable js 左合并两个对象

c++ - 编译时自动包含当前版本号

git - 如何注销一个Github账户并使用另一个账户?

debugging - Nestjs 如何在 VS 代码中编辑代码时进行调试

c - 解析字符数组时出现段错误

java - 配置 IntelliJ 以使用反编译 jar 源代码的正确方法

java - 合并排序算法的问题