Who Works in Each Dir

In a Git repository, git shortlog --summary -- . lists the contributors.
This can be used in a loop over each sub-directory.

I found myself in a sub-directory S of a (Git-) project. It contained close to a dozen sub-directories SS_0 … SS_n for whatever parts. You might think of some sort of modules. I wondered, who was working on each part of the project. Or, in other words, who committed into each sub-directory.

for dir in `ls` ; do echo "## $dir"; git shortlog -s -n -- $dir; done