查看所有代碼
git log --author="oak" --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 }' -
查看某個時間段的代碼產出
git log --stat --since=2020-06-01 --until=2020-06-05 | perl -ne 'END { print $c } $c += $1 if /(\d+) insertions/;'
ps:可以以此作為績效的重要考核指標