back to Git.

Short answer: It depends. Git stores "objects" as zlib compressed data. So the exact size of a commit will depend on the compressibility of your files (which is basically a function of the amount of repetition in them).

https://git-scm.com/docs/gitformat-loose

The other factor is that Git eventually turns object files into even more efficient packfiles, saving additional space by getting rid of redundancy across objects.

https://git-scm.com/book/en/v2/Git-Internals-Packfiles

For fun, I did some little experiments (all "loose objects" with no packfiles created). Here’s the results:

  • 64,828 bytes - git init
  • 47,640 bytes - committing 250 tiny files
  • 17,145 bytes - committing 3 bytes of change to a file in a directory of 50 files
  • 8,709 bytes - committing 3 bytes of change to a single-file repo
  • 297,873 bytes - committing a 583,840 byte binary file
  • 1,622,188 bytes - committing a huge 16,415,223 byte source file