gitk 可以默认显示合并的差异吗? [英] Can gitk show the diff of merges by default?

查看:20
本文介绍了gitk 可以默认显示合并的差异吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前用于没有冲突的合并 gitk 显示没有差异.是否有可能由合并产生的差异(确实存在,例如 git diff HEAD~1 在合并后显示这些差异)由 defautl 显示,例如使用命令行开关?或者为什么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?

推荐答案

默认情况下 gitkgit diff 的 --cc 选项做同样的事情 并压缩合并以仅显示不直接来自一个或其他父级的差异块.这通常更有帮助,因为冲突是合并的有趣部分,差异的其他部分已经出现在组成合并分支的提交的差异中.

By default gitk does the same thing as the --cc option to git 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 可以默认显示合并的差异吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆