开发者

How to see exactly what happend in git merge

开发者 https://www.devze.com 2023-04-09 06:41 出处:网络
I\'m in branch_X I do git log -plib/foo to see differences in the file foo, but the interesting thing I want to see is just written as:

I'm in

branch_X

I do

 git log -p  lib/foo  

to see differences in the file foo, but the interesting thing I want to see is just written as:

commit aaaaaaaaaaaaaaaaaaaa
Merge: bbbbbbbb cccccc

   Merge branch 'branch_X' into branch_Y
开发者_StackOverflow社区
   Conflicts:
       lib/foo

How can I see exactly what happend in this merge? Something bad seems to have gotten inserted into branch_X during this merge.


It sounds like you want to view the differences that were merged in which you can do with:

git diff aaaaaaaaaaaaaaaaaaaa^ aaaaaaaaaaaaaaaaaaaa

Although looking at the message: "Merge branch 'branch_X' into branch_Y", it sounds like the merge was done the other way around. Either way you might want to look at the merge the other way around and see what the differences to the second parent were:

git diff aaaaaaaaaaaaaaaaaaaa^2 aaaaaaaaaaaaaaaaaaaa
0

精彩评论

暂无评论...
验证码 换一张
取 消