如何区分父项的提交? [英] How to diff a commit with its parent?
本文介绍了如何区分父项的提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
除了编写别名或脚本,是否有一个比较简短的命令来获取特定提交的差异?
git diff 15dc8 ^ .. 15dc8
如果您只给出单个提交ID git diff 15dc8
,它不同于针对HEAD的提交。
解决方案使用
git显示$ COMMIT
。它会显示提交的日志消息以及该特定提交的差异。 Aside from writing an alias or script, is there a shorter command for getting the diff for a particular commit?
git diff 15dc8^..15dc8
If you only give the single commit id git diff 15dc8
, it diffs that commit against HEAD.
解决方案
Use git show $COMMIT
. It'll show you the log message for the commit, and the diff of that particular commit.
这篇关于如何区分父项的提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文