Is Git more efficient than Git LFS for large frequently changed text files?

68 views Asked by At

I gather from Multiple file versions in git-lfs that Git LFS stores a full copy of each version of a file even if only a small portion of the file changed. But it's my understanding that Git itself only stores distinct blocks of text and if a new version of a text file is mostly the same as an old version, it would not duplicate the whole file. So if I have a large text file that changes frequently, but usually only a few small pieces of it are changing at a time, am I better of storing it in Git instead of in LFS?

1

There are 1 answers

3
Jim Redmond On

For a text file that changes often, you should be fine storing it in Git itself; Git compresses and deltifies text-based formats pretty efficiently, so multiple versions of that large file should store well.

Git LFS is a better fit for binary formats that change often and/or need versioning. (You can still put text files in LFS, though, and if you use a hosting provider with strict size limits then you might have to.)