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\n", 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\n", add, subs, loc }'
結束