Ana Sustic
Ana Sustic

Reputation: 445

How to estimate the size of a git version?

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 original commit new commit -> observing change in size new commit -> observing change in size

Upvotes: 0

Views: 249

Answers (1)

actual_panda
actual_panda

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

Related Questions