gitk 可以默认显示合并的差异吗?
目前,对于没有冲突的合并,gitk
显示没有差异。是否可以通过 defautl 显示合并产生的差异(确实存在,例如合并后显示这些差异的 git diff HEAD~1),例如使用命令行开关?或者为什么 gitk 默认情况下不显示它们?
Currently for merges without conflicts gitk
shows no diffs. Is it possible to have the diffs resulting from a merge (which are indeed there, e.g. git diff HEAD~1
after the merge shows these diffs) shown by defautl, e.g. using a command line switch? Or why does gitk by default not show them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
默认情况下,
gitk
与git diff
的--cc
选项执行相同的操作,并压缩合并以仅显示不显示的差异块直接来自一位或另一位父母。这通常更有帮助,因为冲突是合并的有趣部分,差异的其他部分已经出现在构成合并分支的提交的差异中。查看父级之间完整差异的最简单方法合并和合并提交的方法是选择父级(正常单击),然后从合并提交的上下文菜单(右键/备用单击菜单)中选择“Diff selected -> this”。
By default
gitk
does the same thing as the--cc
option togit diff
and compresses the merge to only show diff chunks that don't come directly from one or other parent. This is usually more helpful as conflicts are the interesting part of merges, the other parts of the diff will already appear in the diffs for the commits that made up the branch which was merged in.The easiest way to view the full diff between a parent of a merge and the merge commit is to select the parent (normal click) and from the context menu on the merge commit (right/alternate click menu) select "Diff selected -> this".
是的,您可以使用 gitk --no-merges 来做到这一点。
Yes, you can use
gitk --no-merges
to do that.