BT

Git Large File Storage Promises to Extend Git to Large Binary Files

| by Sergio De Simone Follow 21 Followers on Apr 14, 2015. Estimated reading time: 1 minute |

Git Large File Storage (LFS) is an open source Git extension aimed to better "integrate large binary files such as audio samples, datasets, graphics, and videos" into a Git workflow, says GitHub.

As it is well known, Git is not particularly efficient when it comes to storing binary files, since:

By default git will compress and store all subsequent full versions of the binary assets, which is obviously not optimal if you have many.

Git LFS approach to large binary files handling consists in replacing them with "text pointers," i.e, text files containing information to identify the binary file. Text pointers are stored inside Git, while the large files themselves are hosted on a Git LFS server over HTTPS.

Git LFS extends Git by adding a new lfs command to it, which supports the following options:

  • config: display Git LFS configuration.
  • init: initialized Git LFS.
  • logs: show errors from git-lfs.
  • track: add a large file to Git repo; it allows to specify a file extension.
  • untrack: remove a file from Git LFS.
  • push: push tracked files to Git LFS endpoint.
  • status: Displays paths of modified Git LFS objects.

Thus, to add a large file to an existing repo, you would do:

git lfs track "*.pdf"
git add file.pdf
git commit -m "Add design file"
git push origin master

According to GitHub, there are currently only two implementations of the Git LFS server API: the reference server implementation, and GitHub.com, which is not available yet. GitHub has already announced a free LFS plan allowing up to "1 GB of free file storage and a monthly bandwidth quota of 1 GB." Larger quotas will be available through paid plans, but pricing details are not available yet.

Previously to Git LFS, managing large binary files with Git was already possible thanks to git-annex, a Git extension that uses a similar approach to Git LFS', in that it stores the files' content in .git/annex and a symlink to that location in Git proper.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
BT