What command can I use to know how many files are different between two branches, just a summary, not the actual files. Something like:
51 Modified
3 Deleted
4 New files
What command can I use to know how many files are different between two branches, just a summary, not the actual files. Something like:
51 Modified
3 Deleted
4 New files
试试git diff --stat
。还有更短的--shortstat
。
例如在分支master
类型上git diff --stat otherbranchname
git diff --shortstat branch1..branch2
这将显示两者之间的差异branch1
,branch2
但仅输出一个简短的摘要,例如:
2 files changed, 165 insertions(+), 5 deletions(-)
还有其他方法可以指定提交范围,将查看,您可以在手册git diff
中阅读它们。