Discovering Senior Developers from Source Code History
garysieling.com
garysieling.com
But number of commits is a horrible way to infer seniority. Unless you value "frequency of checkpointing changes" above all else. You get what you measure, so I suspect OP is going to get a lot of small commits in the future.
The reason it works is that people write commit message like "Fix X for ACME Corp", and the project leads tend to work on the project for the most calendar time - they may not have the most commits if they have to attend meetings, but after a project/release "finishes", one person ends up sticking around for a while to handle any issues that come up. That naturally gives them some small commits.
To me the risk to me is that this may not generalize, since different projects/products are run in varying ways.
I could imagine search with some standards (commit message format, branch/rebase strategies, requiring an associated tickets) would be really effective, though not so much the general case. Hope you can share in a follow up post if you find ways to deal work around these problems.
I have some material for a couple follow-ups to this, so stay tuned - dealing with code separate from natural language text is an interesting topic as well.
https://github.com/gilesbowkett/rewind
It's just useful to profile the team in terms of who writes the most code, or to profile the project in terms of when it's seen the most activity. The first time I did this, it was a rescue project, and the people who we were rescuing didn't even bother to properly introduce us to the rest of the team (the real thing they needed rescuing from was team dysfunction), so I'd have been at a real disadvantage if I hadn't done the analysis.
You could also graph commits over time in particular repos/apps/folders, and see who is has been the main maintainer/developer for those sections of the codebase at various times. Cool stuff!