Skip to content

Instantly share code, notes, and snippets.

@fooling
Last active October 24, 2018 10:13
Show Gist options
  • Save fooling/2c26e9150b18fba419fd601b2e9e2895 to your computer and use it in GitHub Desktop.
Save fooling/2c26e9150b18fba419fd601b2e9e2895 to your computer and use it in GitHub Desktop.
统计两次commit之间的代码量
git log --numstat --pretty="%H" 881579dd2569369f92104737d913629d4d6a6db5..branch_3.0.1 | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d,-%d\n",plus,minus)}'
git log --numstat --pretty="%H" 434868bb^..HEAD | grep bks | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment