Skip to content

Instantly share code, notes, and snippets.

@sukechannnn
Created April 20, 2025 13:38
Show Gist options
  • Save sukechannnn/8a9ba53f4fcd0933f818c2bc4e946099 to your computer and use it in GitHub Desktop.
Save sukechannnn/8a9ba53f4fcd0933f818c2bc4e946099 to your computer and use it in GitHub Desktop.
git log --since="3 months ago" --pretty=tformat:"%an" --numstat | KGEMBADOC-1320 ✭ 22:34:52
awk '
NF==1 {author=$1}
NF==3 {additions[author]+=$1; deletions[author]+=$2}
END {
for (a in additions)
printf "%s,%d,%d\n", a, additions[a], deletions[a]
}' | sort -t',' -k2,2nr | awk -F',' '
BEGIN { printf "%-25s %10s %10s\n", "Author", "Additions", "Deletions" }
{ printf "%-25s %10d %10d\n", $1, $2, $3 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment