Skip to content

Instantly share code, notes, and snippets.

@BigBlueHat
Created March 12, 2026 20:03
Show Gist options
  • Select an option

  • Save BigBlueHat/1664a0e44d09e7c148d990661979c3e4 to your computer and use it in GitHub Desktop.

Select an option

Save BigBlueHat/1664a0e44d09e7c148d990661979c3e4 to your computer and use it in GitHub Desktop.
Get the list of git committers in order of their commits. Useful for populating authors/editors lists in W3C specifications.
git log --pretty=format:'%aN' --numstat | awk '{
if ($0 ~ /^$/) { next }
if ($0 ~ /^[^0-9]/) {
author = $0;
gsub(/^Author: /, "", author);
} else {
inserted = $1;
deleted = $2;
total = inserted + deleted;
lines[author] += total;
}
} END {
for (author in lines) {
printf "%d\t%s\n", lines[author], author;
}
}' | sort -nr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment