开发者

How to list what changed during a merge in Git?

Something I still haven't gotten my head wrapped around with regards to using Git is how do I list 'what changed' as a result of a merge in Git? Ultimately, I just want a list开发者_开发问答 of files that were modified as a result of the merge.

I'm thinking that maybe I do something like this? 'git diff --name-only '

Just so you know, I am using 'non-fast-forwarded' merges.

thx


I like

git diff --stat HEAD..HEAD^

That gives you filenames and a one-line listing of the number of changed lines in the file. It's handy to know what changed a little and what changed a lot.


If I understand correctly, you just did git merge, and ended up with the merge commit as your head. You can check the changes from the merge commit by doing:

git diff --name-only HEAD^

Which will list all of the files that changed between your head and the previous commit.


Should be this one

git diff HEAD^ HEAD

HEAD^ is your merge commit HEAD is your head of your branch

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜