做的时候:
git merge some-branch
我得到了
BUG: There are unmerged index entries:
BUG: 3 docfatal: Bug in merge-recursive.c
不确定这意味着什么,但通常看起来更意外。我应该怎么做呢?是否有一些清理命令可以帮助我?
修改
更糟糕的是,这个bug实际上是在我的某个源版本中传播的。由于some-branch
最初只是我的本地工作,我把它推到了远程服务器上。然后克隆了一个新的存储库并尝试合并上述分支并获得相同的消息。
编辑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
注意:我最近将一个目录移动到一个单独的子模块中。现在我因此而受到很多冲突。似乎这个bug与此有关。
答案 0 :(得分:3)
该错误消息为introduced in January 2010,为了帮助调试此案例,Junio C. Hamano建议将GIT_MERGE_VERBOSITY
设置为5:
我们可能想建议用户将
GIT_MERGE_VERBOSITY
设置为5并在邮件中重新运行合并。
至少我们会知道process_renames()
或process_entry()
函数的哪一部分未正确处理未合并的路径,这可能有助于我们诊断问题。
CONFLICT (directory/file):
There is a directory with name doc in Temporary merge branch 1.
Adding doc as doc~Temporary merge branch 2
允许隔离导致此错误消息的目录。
答案 1 :(得分:2)
我刚删除当前结帐中的doc/
(冲突文件夹)并重新运行合并。有一些冲突,但这次没有错误。
答案 2 :(得分:0)
当我遇到此错误时,关闭重命名检测功能。
UPDATE TableA JOIN TableB ON TableA.col1 = TableB.col1
SET TableA.col1 = TableB.col2
答案 3 :(得分:0)
以防万一,这对于解决方案也是要改变策略的:
git merge -s我们的
很久以前,基本分支已经转移了,无法进行重新设置,因此这解决了在保留当前分支内容的同时将更改从我的分支中移出的问题。