News for hackers. Stuff that matters.
Re:Storing large binary files in Git repositories (2015) by mikeash on Tuesday March 08, 2016 @01:56PM (#11247557)
Git isn't usually for the assets generated from code, but for the code itself. Code is an asset generated by a fiddly manual process, and both code and other assets go into producing the final results, so is that really a point of separation?
Re:Storing large binary files in Git repositories (2015) by jessaustin on Tuesday March 08, 2016 @02:03PM (#11247613)
Perhaps I was unclear. git should store code, and the build process should use that code to build whatever assets might be built from code. All other assets should be stored elsewhere and used by the build and/or deployment process in some appropriate manner that doesn't involve git.

[EDIT:] Perhaps we were both unclear! By "code", I mean stuff that can be read and edited by normal humans, which by some automatic mechanism can be used to control computers. E.g., if you had a log of photoshop actions that could be replayed to produce a given image, that would be code, and it would be suitable for storage in git. In general, the image itself ought to be elsewhere.

Re:Storing large binary files in Git repositories (2015) by mikeash on Tuesday March 08, 2016 @02:26PM (#11247800)
My point is that code and other assets aren't really that different. Both are human produced, human editable files which go into producing the final product. So why should the "code" go into git but the "not-code" human-produced files go elsewhere?
Re:Storing large binary files in Git repositories (2015) by kruczek on Friday March 11, 2016 @06:23AM (#11265946)
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.