I would like to produce a graph or table of the total repository size vs time (or commit).
Is there a git command or tool that does this? I have tried git log
but it does not seem to have an option to export the size of the commits.
The size of a commit is very hard to define. First of all, most commits recycle a lot of existing Git objects. If you don’t change a file between revision A and B, should the size of B include the size of that file? Also, the repository size itself is not that easily determined either. Due to Git’s compression system, it will repack objects from time to time. The way it does that can be influenced by multiple things, so it might not pack the same way if you do it again, resulting in a different total size.
What you could do is check the size of the checked-out tree of every revision. But of course the result you will get there will be far away from the repository’s size itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With