所有分支上每位作者的 Git 提交次数
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9839083/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git number of commits per author on all branches
提问by jabal
I'd like to get the number of commits per author on all branches. I see that
我想获得所有分支上每位作者的提交次数。我看到
git shortlog -s -n
Prints a very nice list but it is not counting the commits that are not yet merged from other branches. If iterate this command over every branch then obviously the common commits get counted multiple times. Could you give me a script/command that would yield me the overall picture?
打印一个非常好的列表,但它不计算尚未从其他分支合并的提交。如果在每个分支上迭代这个命令,那么显然常见的提交会被多次计算。你能给我一个脚本/命令来让我了解整体情况吗?
回答by ralphtheninja
git shortlog -s -n --all --no-merges
Will give you statistics for all branches.
将为您提供所有分支机构的统计数据。
EDIT: Added --no-merges
to exclude statistics from merge commits.
编辑:添加--no-merges
以从合并提交中排除统计信息。