赞
踩
查看当前分支所有提交者及其提交次数,按次数由高到低排序
具体命令如下:
git log | grep "^Author: " | awk '{print $2}' | sort | uniq -c | sort -k1,1nr
现在每个月项目组要统计工作绩效,要提交每个月的git提交数目,所以整理了个脚本:
git log --author=yourname --since="2014-07-01" --no-merges | grep -e 'commit [a-zA-Z0-9]*' | wc -l
git log --author="_your_name_" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -
输出结果:added lines: 38861, removed lines: 22916, total lines: 15945
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。