我正在尝试将分支feature
合并回master
。 master
在feature
分支之前提交了十几个提交,feature
包含三个提交,与master
之后的任何内容都没有冲突。这应该是一个非常简单的合并。
如果我要做一个rebase工作流程,没有任何问题(文件名省略):
$ git checkout feature
$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: first
Applying: second
Applying: third
$ git checkout master
$ git merge feature
Updating 5e42a1d..3642da3
Fast-forward
...
34 files changed, 575 insertions(+), 658 deletions(-)
create mode 100644 ...
create mode 100644 ...
copy ... (64%)
rename ... (64%)
delete mode 100644 DIR_1
create mode 100644 ...
create mode 100644 ...
delete mode 100644 DIR_2
rename ... => A (100%)
rename ... => B (100%)
rename ... => C (100%)
rename ... => D (100%)
rename ... => E (100%)
rename ... => F (100%)
rename ... => G (93%)
rename ... => H (94%)
rename ... => I (95%)
rename ... => J (92%)
rename ... => K (100%)
rename ... => L (100%)
rename ... => M (100%)
但是,如果我进行合并,那同样没有问题:
$ git checkout master
$ git merge feature
Removing DIR_1
Removing DIR_2
A: unmerged (918a9f784e16a17792d47da2ea2623137c42b6b6)
B: unmerged (e7fe52f5c9ecc93ff25b66cc7c34a0ea511a809a)
C: unmerged (8e076d6459e36f7296a152c75b8c2d6a75abff18)
D: unmerged (93ae1467cfcb0dac26a7b503c49a72228cc35221)
E: unmerged (9014187a5c414024ec5e2deaf58ee2e3d6327dd6)
F: unmerged (109e70ec7786bdafd00a609f9f0b53a33b5f9989)
G: unmerged (c952cbf52ae282ee707b2d8a4166b53864b62bb7)
H: unmerged (0aa9792eae3bc7f84575c6f85662c494b53911fd)
I: unmerged (a6f19de4dbd21214e5716e6578d4c8591f5f6475)
J: unmerged (1812c7ec3701598203595ae411901626d3a3f2d9)
...
fatal: git write-tree failed to write a tree
文件A
.. J
与rebase
输出中重命名的文件相同,而DIR_1
和DIR_2
相同标记为delete mode
。
错误是什么意思?当git rebase / merge干净利落时,导致我的git merge失败的原因是什么?我在Ubuntu上使用git 1.7.0.4。
答案 0 :(得分:0)
如果将来遇到任何人,它似乎是一个git bug。升级到1.8.3.1之后,我能够执行合并而没有任何问题:没有预期的冲突,没有“致命:git write-tree无法写树”。