2
$\begingroup$

Blender and git seems like working exceptionally well together!

I took some tests with hundred of megabyte files and versioned these several times.. the result was a git folder of just a couple of MB... and sometime even lighter then before committing!

from test to test I run a git gc for the garbage collection...

I also took some tests on merging and apparently It handles (for simple tasks like materials modification and new objects creation/deletation) the thing pretty well!

so my question is...

how's that git works so well with Blender? Is something in the code? It's because of python... anything else? =]

tested with git 2.17.0-1 and blender 2.79.b-5

$\endgroup$
  • $\begingroup$ Probably because git uses 'zip' to compress files...? $\endgroup$ – jcoder Apr 16 '18 at 12:00
  • $\begingroup$ yes but dimensions are almost the same at every commit.. even if compressed, a bin should remain a bin and like so double or like so... the size of the repo! $\endgroup$ – Francesco Yoshi Gobbo Apr 16 '18 at 13:33
2
$\begingroup$

Blender saves a direct copy of its memory to the blend file. As a result, the file contents change little when you change a small thing in Blender. This allows tools that perform binary diffs (not sure about Git, but Subversion and Mercurial do a good job at this) to produce a small diff.

When you save your blend file compressed, the entire file can change even when in Blender only a single bit was flipped. This prevents efficient diffing, and thus makes it work much less efficient with such tools.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.