Git compare “base” version with “theirs” version of a conflicted file?

你。 提交于 2019-12-03 09:06:19

问题


Given a conflicted file foo.txt, how to tell git diff to show changes between the base version of the file and "their" version of the file?

I can see each of the versions via git show :1:foo.txt or git show:3:foo.txt - is there a simple way to compare the two versions?


回答1:


git diff :1:foo.txt :3:foo.txt




回答2:


Simply type git diff and it will show only the conflicts.

Further reading: Advanced Merging

Notice the --base and --theirs arguments for diff



来源:https://stackoverflow.com/questions/8488365/git-compare-base-version-with-theirs-version-of-a-conflicted-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!