Git所有分支上每个作者的提交次数

本文介绍如何使用Git命令统计所有分支上每个作者的提交次数,避免重复计算已合并的提交,并提供了一个实用的命令来获取全面的统计信息。

本文翻译自: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从合并提交中排除统计信息。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值