1.前往git本地项目路径下
2.右键打开(Git Bash)工具
3.输入命令:
1)某段时间代码修改量
git log --since=2021-01-01 --until=2021-05-18 --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s ", add, subs, loc }'
修改时间段为自己所需时间段
2)总代码量
git log --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s ", add, subs, loc }'
结束