Find size of Git repository

Note that, since git 1.8.3 (April, 22d 2013):

git count-objects” learned “--human-readable” aka “-H” option to show various large numbers in Ki/Mi/GiB scaled as necessary.

That could be combined with the -v option mentioned by Jack Morrison in his answer.

git gc
git count-objects -vH

(git gc is important, as mentioned by A-B-B‘s answer)

Plus (still git 1.8.3), the output is more complete:

git count-objects -v” learned to report leftover temporary packfiles and other garbage in the object store.

Leave a Comment