1. 程式人生 > >git 代碼統計

git 代碼統計

man for bsp while ges fault $2 == auth

查看git上的個人代碼提交量:

git log --author="Marek Romanowski" --since="2019-01-01" --no-merges | grep -e ‘commit [a-zA-Z0-9]*‘ | wc -l

查看git上的個人代碼量:

git log --since="2019-01-01" --until=‘2019-02-01‘ --author="Marek Romanowski" --pretty=tformat: --numstat --no-merges | awk ‘{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }‘ -


--since=1.day.ago

統計每個人增刪行數

git log --format=‘%aN‘ | sort -u | while read name; do echo -en "$name\t"; git log --since ==2019-01-01 --until==2019-02-01 --author="$name" --no-merges --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 > a.cvs

https://segmentfault.com/a/1190000008542123

git 代碼統計