当前位置:   article > 正文

git统计代码提交次数以及行数近一个月_git统计提交代码笔数

git统计提交代码笔数

printf “\n1. 项目成员数量:”; git log --pretty=’%aN’ | sort -u | wc -l

printf “\n\n2. 按用户名统计代码提交次数:\n\n”
printf “%10s %s\n” “次数” “用户名”
git log --pretty=’%aN’ | sort | uniq -c | sort -k1 -n -r | head -n 5
printf “\n%10s” “合计”;
printf “\n%5s” “”; git log --oneline | wc -l

printf “\n3. 按用户名统计代码提交行数:\n\n”
printf “%25s +s = +s - %18s\n” “用户名” “总行数” “添加行数” “删除行数”
git log --format=’%aN’ | sort -u | while read name; do echo -en “KaTeX parse error: Undefined control sequence: \t at position 5: name\̲t̲"; git log --au…name” --after=“2024-02-20 00:00:00” --before=“2024-03-20 23:59:59” --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 }’ -; done

printf "\n%25s " “总计:”; git log --pretty=tformat: --numstat |
awk ‘{ add += $1; subs += $2; loc += $1 - $2 } END { printf “%15s %15s %15s \n”, loc, add, subs }’

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/497653
推荐阅读
相关标签
  

闽ICP备14008679号