一、进入项目目录下(包含.git的目录)
![](https://i-blog.csdnimg.cn/blog_migrate/ea7bf0a35ad21516864b5978ff78d5fd.jpeg)
二、统计某个时间段内的git新增/删除代码行数
git log --since='2021-03-01' --before='2021-04-08' --pretty=tformat: --numstat | grep java | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -