Git统计指定时间段内代码增删汇总行数

来源:互联网 发布:官居一品 知乎 编辑:程序博客网 时间:2024/06/06 05:31

git log  --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat:  --since ==2017-4-1 --until=2017-9-30 --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

转载出处:https://maoxian.de/2015/12/1357.html

原创粉丝点击