即使每个更改的文件都与其中一个父文件一致,如何“git show”合并提交并合并差异输出?

10/17 02:22
阅读数 0

问题:

After doing a "simple" merge (one without conflicts), git show usually only shows something like在做了一个“简单”的合并(一个没有冲突的)之后, git show通常只显示类似

commit 0e1329e551a5700614a2a34d8101e92fd9f2cad6 (HEAD, master)
Merge: fc17405 ee2de56
Author: Tilman Vogel <email@email>
Date:   Tue Feb 22 00:27:17 2011 +0100

Merge branch 'testing' into master

This is because, for merges, git show uses the combined diff format which omits files that agree with either of the parent versions.这是因为,对于合并, git show使用组合 diff 格式,该格式忽略与任一父版本一致的文件。

Is there a way to force git to still show all differences in combined diff mode?有没有办法强制 git 在组合差异模式下仍然显示所有差异?

Doing git show -m will show the differences (using pairwise diffs between the new and all parent versions respectively) but I would prefer to have that with the differnces marked by +/- in the respective columns like in combined mode.执行git show -m将显示差异(分别使用新版本和所有父版本之间的成对差异),但我更喜欢在组合模式下在相应列中用 +/- 标记差异。


解决方案:

参考一: https://en.stackoom.com/question/LHdd
参考二: https://stackoom.com/question/LHdd
展开阅读全文
git
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部