Total commits in git

(This is a legacy post from the old website.)

I recently needed to know how many commits had gone toward a project. Short answer?

git rev-list --all | wc-l

This will give you total commits for all branches on the remote repo.

I stole this from Ruslan Khmelyuk’s blog. Additionally, there is a Stackoverflow thread about it.

Leave a Reply

Your email address will not be published. Required fields are marked *