本文翻译自:Git number of commits per author on all branches
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? 你能给我一个脚本/命令,让我了解整体情况吗?
#1楼
参考:https://stackoom.com/question/FhAT/Git所有分支上每个作者的提交次数
#2楼
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从合并提交中排除统计信息。
本文介绍如何使用Git命令统计所有分支上每个作者的提交次数,避免重复计算已合并的提交,并提供了一个实用的命令来获取全面的统计信息。
363

被折叠的 条评论
为什么被折叠?



