当前位置: 代码迷 >> 综合 >> 如何观察提交代码情况
  详细解决方案

如何观察提交代码情况

热度:7   发布时间:2024-02-02 08:43:42.0

统计每个人的增删行数

git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$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 }' -; done

 

查看仓库提交次数排名前 5

git log --pretty='%aN' | sort | uniq -c | sort -k1 -n -r | head -n 5

  相关解决方案