Skip to content

Instantly share code, notes, and snippets.

@MarkBennett
Created November 27, 2023 18:08
Show Gist options
  • Save MarkBennett/4e3d5346a0c8e12c5a3677581586aec9 to your computer and use it in GitHub Desktop.
Save MarkBennett/4e3d5346a0c8e12c5a3677581586aec9 to your computer and use it in GitHub Desktop.
Extracting contributor emails from a git repo
git shortlog -sne | awk '!/users.noreply.github.com/ {count=$1; $1=""; gsub(/^ /,"",$0); name=substr($0,1,index($0,"<")-1); gsub(/[ \t]+$/, "", name); email=tolower(substr($0,index($0,"<")+1)); gsub(/>/,"",email); print count", \""name"\", \""email"\""}' > contributors.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment