git log --pretty=tformat: --numstat | awk '{ add += $1; del += $2; tot += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s ", add, del, tot }'
Linux、Mac可直接使用,windows需要下载gawk:https://sourceforge.net/projects/gnuwin32/files/gawk/3.1.6-1/gawk-3.1.6-1-bin.zip/download