美文网首页
Git统计代码行数

Git统计代码行数

作者: ADVANCE_ae | 来源:发表于2021-03-31 15:08 被阅读0次

查询 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

相关文章

网友评论

      本文标题:Git统计代码行数

      本文链接:https://www.haomeiwen.com/subject/nszohltx.html