项目路径下打开git bash
执行命令
git log --author="你的git登录名称" --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 }' -
加入时间区间
git log --since=2022-07-01 --until=2022-10-01 --author="你的git登录名称" --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 }' -
标签:loc,git,subs,--,代码,lines,add,统计 From: https://www.cnblogs.com/innocenter/p/16772408.html