Source: https://dev.to/augustohp/files-with-the-most-changes-on-git-repository-46l1
Command to get all files with counts on git log
git log --name-only --pretty="format:" | sed '/^\s*$/'d | sort | uniq -c | sort -nr
# get head files:
git log --name-only --pretty="format:" | sed '/^\s*$/'d | sort | uniq -c | sort -nr | head
# filter files, eg: by "controller" pattern
git log --name-only --pretty="format:" | sed '/^\s*$/'d | grep controller | sort | uniq -c | sort -nr | head