git log HEAD~1..HEAD --author="$(git config --get user.name)" --pretty=tformat: --numstat | awk '{ add += $1 ; subs += $2 ; loc += $1 + $2 } END { printf "(HEAD~1, HEAD] 新增行數: %s 刪除行數 : %s 總行數: %s\n",add,subs,loc }'html
參考:http://www.javashuo.com/article/p-zzlvveip-kc.htmlgit
https://blog.csdn.net/qq_38152806/article/details/90210927.net