How well does Git LFS handle small files?

Is there a best practice for the type files stored in Git LFS? Specifically for the minimum size?

For instance, a 10mb music file would be a obvious fit, but what about a 25kb png? Is it worth putting in LFS or it better to just let Git handle it?

My concern is performance degradation when checking too many small files into an LFS repo. Is there any data on how the LFS extension stands up to a bunch of smaller binary files? Is it advisable to only store files over a certain size threshold?

  • How do I copy part of a commit diff in GitHub without the pluses and the minuses?
  • Git Version Control - Views on Repositories?
  • What happens when you git push but someone else has already committed something you don't have on your local repo?
  • When would one need git-rebase?
  • Git log — how to retrieve only the latest commits of every file in the git history, where each commit only changes one file
  • Migrate from GIT to TFS and retain timestamp for check-in
  • Insight on handling static library revisions (i.e. binaries) with git
  • Ignore all dir's but one
  • One Solution collect form web for “How well does Git LFS handle small files?”

    I would not expect a an exact threshold value being given.

    LFS saves on the amount of data the needs to be exchanged for for synchronizing with a remote repository. However, the saving only applies as long as the large file itself is not changing. Actually for a changed file you would need a second rountrip to process the change on an LFS object.

    So, you may include smaller files with LFS if in your use case those are not changing (frequently). The specific break even will depend on the I/O speed of the server and mostly on the latency and throughput between repository and client.

    In your example, I’d still expect improvements in case the pngs are close to never changing. As soon as they are going to change (almost) on each and every commit even larger files might not benefit from being put to LFS.

    Also the extra cost of second round trip will become less and less important the larger the typical files will be. Especially when the size of a file class (suffix) will vary over a broad range and/or the change frequency within a file class is covering a wide spectrum there might not be a clear answer to your question.

    Git Baby is a git and github fan, let's start git clone.