Skip to content

Instantly share code, notes, and snippets.

@Horusiath
Last active December 2, 2015 22:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Horusiath/484f37f9ae92a220fb7b to your computer and use it in GitHub Desktop.
Save Horusiath/484f37f9ae92a220fb7b to your computer and use it in GitHub Desktop.
Get list of project contributors by added/removed lines and display summary
# output line format: <added+removed> <added> <removed> <author>
git log <past_last_release_tag_here>..HEAD --oneline --numstat --pretty=format:%an --no-merges --abbrev-commit | gawk 'author == "" { author = $0; next } /^$/ { author = ""; next} {added[author] += $1; removed[author] +=$2 } END { for(author in added) { printf "%s\t%s\t%s\t%s\n", added[author]+removed[author], added[author], removed[author], author } }' | sort -n -k1 -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment