gpt4 book ai didi

git write-tree 写树失败

转载 作者:太空狗 更新时间:2023-10-29 14:23:17 25 4
gpt4 key购买 nike

我正在尝试将分支 feature merge 回 mastermasterfeature 分支之前有十几个提交,feature 由三个提交组成,与 master 中所做的任何事情都没有冲突 自。这应该是一个非常简单的 merge 。

如果我要执行 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%)

但是,如果我进行 merge ,同样应该没有问题:

$ 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..Jrebase 输出中重命名的文件相同,并且 DIR_1 DIR_2 标记为删除模式

错误是什么意思?当 git rebase/merge 完全成功时,什么会导致我的 git merge 失败?我在 Ubuntu 上使用 git 1.7.0.4。

最佳答案

以防将来有人遇到这个问题,这似乎是一个 git 错误。升级到 1.8.3.1 后,我能够毫无问题地执行 merge :没有预期的冲突,没有“fatal: git write-tree failed to write a tree”。

关于git write-tree 写树失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30032655/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com