03月27, 2021

git统计代码行数

git统计代码行数

上代码

git log --pretty='%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

本文链接:https://587v5.com/post/git-tong-ji-dai-ma-xing-shu.html

Comments