git 统计一周内开发人员的提交次数和修改行数

 在仓库根目录下执行

 
   

git log --format='%aN' --since=1.weeks | sort -u | while read name; do echo -en "$name\t";git log --author="$name" --since=1.weeks | grep commit | wc -l | awk '{ printf "commit num: %s\t", $1 }'; git log --author="$name" --pretty=tformat: --since=1.weeks --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done

 输出示例:

fuxingbit       commit num: 1   added lines: 9, removed lines: 2, total lines: 7

你可能感兴趣的:(git,工具类,git,github)