2. Git项目代码行数统计

一灰灰blogShellGitGit约 87 字小于 1 分钟

统计项目某个某个时间段的行数

git log --author="$(git config --get user.name)"  --before='2018-12-31 23:59:59' --after='2018-01-01 00:00:00' --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 }'
Loading...