1、在本地项目的目录中找到.git文件夹;
2、打开git bash命令行窗口;
3、运行以下命令;
4、$name中的name换成git本地配置的name,第一个name不用换。
git log --format='%aN' | sort -u | while read name; do echo -en "$name"; git log --author="$name" --pretty=tformat: --numstat --since=2023-01-01 --until=2023-12-31| awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf " added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done