统计指定用户提交代码情况
代码语言:javascript复制git log --author="你的名字" --pretty=tformat: --numstat | awk '{ add = $1; subs = $2; loc = $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %sn", add, subs, loc }' -
统计每个人的代码提交情况
代码语言:javascript复制git log --format='%aN' | sort -u | while read name; do echo -en "$namet"; 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: %sn", add, subs, loc }' -; done