Finding most changed files in Git

You could do something like the following:

git log --pretty=format: --name-only | sort | uniq -c | sort -rg | head -10

The log just outputs the names of the files that have been changed in each commit, while the rest of it just sorts and outputs the top 10 most frequently appearing filenames.

Leave a Comment