Last active
August 14, 2018 21:07
-
-
Save peabnuts123/ffa6f20dc0589e8f9e70f315af140a0a to your computer and use it in GitHub Desktop.
Git commit breakdown by author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IFS=$'\n'; | |
output="$(echo "`for author in $(git log | grep "Author:" | awk '{for (i=2; i<NF; i++) printf $i " "; print $NF}' | sort | uniq); do | |
echo "${author}:|$(git log --pretty=oneline --author=${author} | wc -l | xargs echo) commits"; | |
done`" | sort -n -k2 -r -t '|' | column -t -s '|')"; | |
echo "${output}"; | |
echo "$(git log --pretty=oneline | wc -l) commits total"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment