Reputation: 445
I would like to estimate the size of a git commit for one file? We are using jgit to store versions for some internal files and i would like to estimate how much the a new commit for one file increases the size of the git repository. Any suggestions?
UPDATE: The files we store in git are yaml text files.
When I commit a changed version of a yaml file I do not see any significant change of the .git
Upvotes: 0
Views: 249
Reputation: 1260
(Answer ignores pack files.)
Git would have to store one new blob and some insignificant metadata (like the commit message). If you zlib
the file and inspect its size you will get a good estimate of how much the repo will grow.
Upvotes: 1