git代码产出、工作量统计,两行命令就够了

查看所有代码

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:可以以此作为绩效的重要考核指标

posted @ 2020-06-08 12:57  哦克Oak  阅读(1044)  评论(0编辑  收藏  举报