2 ms·
Because code and other assets are in fact that different. Both are human produced, yes, but I'd argue that they aren't exactly human-editable in the same way. C
by kruczek 11y ago
Because code and other assets are in fact that different. Both are human produced, yes, but I'd argue that they aren't exactly human-editable in the same way. Code (text files) are editable by any text file editor, while non-code is human-editable only when using specific tool to decode the file. This brings us to the third property - only code/text files are human-readable without the need to decode them. And since git is text-file-oriented, it is a good tool for storing text files, but not as good to store binary files. Right tool for the right job, and all that.
To give another example - diff is a pretty common action to see changes between two specific versions of the code. Now if I'd treat both code and non-code assets as equivalent (because they are human produced, etc.), then I'd expect the tool which manages them to also show me diff between versions of binary files. But simple byte-by-byte diff* would be pointless, exactly because non-text files need to be decoded before they can be used. So if I'd treat them as equivalent, I'd expect graphical binary assets to show me the picture with differences between two versions; I'd expect video binary file to show me which time points are different in the recording, etc. etc.
* Well, yes, not exactly byte-by-byte, since it needs to be encoding-aware. But still, much simpler than parsing any random binary file format to show reasonable diff.