Created
June 23, 2022 08:06
-
-
Save datengaertnerei/8f85eb979ddcf3c224e15849b6961e46 to your computer and use it in GitHub Desktop.
Shell script to list the 10 most changed files of a git repo.
This file contains 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 | |
tmpfile="git-count.tmp" | |
echo "file;count" > $tmpfile | |
for file in `git ls-files` | |
do | |
echo $file";"`git log --oneline $file | wc -l` >> $tmpfile | |
done | |
cat $tmpfile | sort -t';' -r -k2 -n | head -10 | |
rm $tmpfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment