Git repo contributor statistics

In bash:

1
2
3
4
5
    for CONTRIBUTOR in $(git log --format='%ae' | sort -u); do 
      echo "${CONTRIBUTOR}";git log --shortstat --author="${CONTRIBUTOR}" | \
        grep -E "fil(e|es) changed" | \
        awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed: ", files, "lines inserted: ", inserted, "lines deleted: ", deleted }'
    done