Last active
August 21, 2019 02:20
-
-
Save mhanberg/38cd0167127a24ad100d479f734d01b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This function will print out the net lines added | |
# in your current changes or in a given commit | |
netlines() { | |
git --no-pager diff --numstat $1 | awk '{sum += ($1 - $2)} END{print sum;}' | |
} | |
$ netlines | |
-200 | |
$ netlines HEAD~1 | |
31 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment