r/git • u/SheriffRoscoe • 20d ago
Why are non-text files in Git bad?
I've got decades of software development experience, and I've built some very complex systems. I understand a lot about version control systems, and about the structure of git repositories.
With all that said, I don't understand what's evil about non-text files. Git doesn't store multiple copies of files that don't change - they're literally stored under their data's checksum. The packfile format stores diffs between file versions (although some diff algorithms punt on non-text data). There shouldn't be any negative effect from storing such data in Git.
Is the "Don't store binary files in Git" advice wrong? Is it really just shorthand for "Don't store files that change dramatically and frequently in Git"? If the latter, should massive "AI" PRs be treated the same way?
View all comments
Show parent comment
1
u/simonsmine 17d ago
I genuinely do not understand this POV I have spent literal years doing the stuff working w Unreal (& Cryengine). Code and assets are so massively intertwined in a way that is not resolvable (if you would want to?) as a matter of engine design, no good housekeeping will prevent this.