yuanzhixiang's blog

yuanzhixiang

Git 统计代码行数命令

70
2021-09-27
git log --author="<author>" --since=2021-09-01 --until=2021-09-27 --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 }' -