请 git 高手进来看看,有没有遇到这么神奇的事情~

2016-10-24 15:29:31 +08:00
 yuankui
我们的项目有个 commit ,是通过合并两个分支得来的

如下,通过 cat-file 可以发现他有两个 parent ,是由着两个 commit 合并来的

git cat-file -p b20cbbc775

tree 592aa5b53aa875119ac01160b50e044a69c203ea
parent 19a0ffaa0368b01d675fd548f976685b643f0886
parent ee7b28350a5a2bc6d6ef171a403b2547be0a849d
author xxx <xxx@xxx.com> 1474607755 +0800
committer xxx <xxx@xxx.com> 1474607755 +0800

Merge branch 'feature/local_delivery' into hotfix/local_delivery_0923

==========================================================
然后这个 commit 比较神奇的是

当时进行合并的时候,并没有什么问题。可以通过日志看得出来。。这一点毋庸置疑


现在拿到这两个 commit ,重新合并,就出现大量冲突。。。


这是什么情况???


git co 19a0ffaa0368b01d675fd548f976685b643f0886 -b merge
git merge ee7b28350a5a2bc6d6ef171a403b2547be0a849d

.........
both modified: v2/wap/xxxxxxxxxxxxxxxore.php
both modified: v2/wap/xxxxxxxxxxxxxxxods.php
both modified: v2/wap/xxxxxxxxxxxxxard.php
both modified: v2/wap/xxxxxxxxxxxxxxxxxxxge.php
both modified: v2/wap/xxxxxxxxxxxxxxxxeV2.php
both modified: v2/xxxxxxxxxxxxxxxxtore.php
deleted by them: v2/wxxxxxxxxxxxxxxxrt.php
both modified: v2/wwxxxxxxxxxxxxx.html
both modified: v2/wxxxxxxxxxxxxxxxxxxx.php
1683 次点击
所在节点    程序员
2 条回复
lonelinsky
2016-10-24 16:24:13 +08:00
当时进行合并的时候,并没有什么问题。可以通过日志看得出来。。这一点毋庸置疑

如果当时手动解决冲突,并把 commit 里面的 Conflicts 提示删掉的话,从日志是看不出来的吧…
yuankui
2016-10-24 17:16:13 +08:00
@lonelinsky 找到关键了~

我后来试着重演一下,日志里面并没有 conflicts 提示。。
我使劲想,使劲想,但是想不起当初是否处理了冲突。。

哎,估计我的潜意识里不愿意承认吧

但是事实上,种种现象,证明,我当时肯定处理了冲突!

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/315035

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX