總代碼量:
git log --author="" --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 --since=“2015-02-01” --format=’%aN’ | sort -u | while read name; do echo -en “KaTeX parse error: Undefined control sequence: \t at position 5: name\̲t̲"; git log --si…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
粘貼後切記要檢查下單引號雙引號的格式,必須是英文符號纔行