You can try to analyze the output of git-blame . This command gives the last person who edited each line of the file.
This example is not exactly what you want, but I think it gives you an idea:
git blame -e the/file | awk -F '<|>' '{print $2}' | sort | uniq -c
This will print the authors email addresses along with the number of lines that they last modified for the file, for example:
47 foo@bar.com 34712 blah@baz.com
To run it in the entire repository, you can do something like this:
git ls-files | while read f; do git blame -e $f; done | awk -F '<|>' '{print $2}' | sort | uniq -c
The idea here is to first generate a list of files with git ls files, and then run the above snippet in each of the files (using the snippet below here ). If you use this on a large code base, you may want to save intermediate results in temporary files rather than using pipes.
Job
source share