8

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
4

2 回答 2

12

试试git diff --stat。还有更短的--shortstat

例如在分支master类型上git diff --stat otherbranchname

于 2013-06-06T18:36:02.627 回答
4
git diff --shortstat branch1..branch2

这将显示两者之间的差异branch1branch2但仅输出一个简短的摘要,例如:

2 files changed, 165 insertions(+), 5 deletions(-)

还有其他方法可以指定提交范围,将查看,您可以在手册git diff中阅读它们。

于 2013-06-06T18:52:19.403 回答