I've cloned a big repository, and I'd like to know on which files most of the work has been done.
Is there any git
command which can display the list of files with total number of commits or something similar?
I've cloned a big repository, and I'd like to know on which files most of the work has been done.
Is there any git
command which can display the list of files with total number of commits or something similar?
I have some bash
'y way to count how many commits per file.
git log --name-only --pretty=format: | sort | uniq -c | sort -nr
This answer has some good suggestions: Finding most changed files in Git
The tool mentioned is git effort in the git-extras package, which can be installed with
sudo apt install git-extras
and run at the root of a git project with the command
git effort
It shows the path to the file, the number of commits affecting the file, and the number of days (active days) in which those commits occurred. In other words, it tries to approximate the effort put into each file in a project over time. It's also color coded.
If you would rather use the raw bash script to do this instead of using a package manager, it has a github page here.