This is a quick way to approximate how many person-hours have put into a git repo.
git log --pretty=format:"%ae %ad" --date=format:'%Y-%m-%d %H' | uniq | wc -l
The --pretty=format
gives you the author email and commit date, and the date is formatted to just include the year, month, day and hour, like so: 2020-12-22 16
. You can add a grep before or after the unique to filter out by author. wc -l
tells you the number of lines, which are uniqued, meaning if you had two commits in the same hour, those are filtered out.