I am trying to found out the total number of commits made across all repositories hosted on a gitosis install I have. Anyone have any ideas to how I may do this?
ls /path/to/repos/ | xargs -I % git --git-dir=/path/to/repos/%/.git rev-list --all 2>/dev/null | wc -l
That works fairly well for me. You can grep -v zip
or use a more specific find
query to just find specific directories, too.
Update: use rev-list --all
instead of log --pretty=oneline
.