Git统计代码行数

2021-03-31  本文已影响0人  ADVANCE_ae

查询 xxx 从2021-01-01~2021-02-02 期间提交和删除的代码数量

git log --author=xxx --since=2021-01-01 --until=2021-02-02 --format='%aN' | sort -u | while read name; do echo -en "name\t"; git log --author="name" --pretty=tformat: --numstat | grep "(.html|.java|.xml|.properties)" | awk '{ add +=1; subs += 2; loc +=1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done

上一篇 下一篇

猜你喜欢

热点阅读