Git 统计代码行数

Git 统计各成员贡献的代码行数

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

Git 统计代码总行数

git log --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 }' -

 

posted @ 2021-07-15 19:02  FrankYou  阅读(547)  评论(0编辑  收藏  举报