Last active
October 2, 2024 13:34
-
-
Save serverhorror/04ddcdeaee82692593279c3d1d108ca7 to your computer and use it in GitHub Desktop.
git-multi-repo-statistics
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/sh | |
# shellcheck disable=SC2044 | |
for repo in $(find . -mindepth 1 -maxdepth 1 -type d); do | |
if [ ! -d "$repo/.git" ]; then | |
continue | |
fi | |
( | |
git -C "$repo" shortlog --group=':%aE' -s | |
) | cat | |
done | | |
sort -k 2,2 | | |
awk -F ':' '{contributors[$2]+=$1} END { for (contributor in contributors) { printf("%s\t%s\n", contributors[contributor], contributor) }}' | | |
sort -n -r -k1,1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment