Hacker News new | ask | show | jobs
by catlifeonmars 107 days ago
Hash the files and commit the hashes. Store the large files somewhere convenient, keyed by the hash. Voila, you’ve invented an LFS.
2 comments

That's just how plain git works anyway. Commits are just a tree of hashes which refer to the blobs in the objects store. Diffing is done on demand. If you can implement diff for binary files, then you've got git.
True. The main difference, like you pointed out, are the concept of a file tree and a commit tree which adds some structure along the time and space dimensions on top of the content-addressable blob storage.
That's exactly what git-annex does: https://git-annex.branchable.com/

LFS is kinda close, but you don't store the files "somewhere convenient": you need support on every git remote to handle the files.