Large files in Backlog are no longer a hassle with Git LFS

Large files in Backlog are no longer a hassle with Git LFS

We’ve all been there: your team adds a few larger graphic files to your project repository and after a few weeks of code updates with version control, they start to take over your entire repository.

Large binary files in Git add up quickly: every time you commit even a tiny change to a 100 MB file, your repository grows by another 100 MB. If unchecked, your repository can get so large it starts to feel unusable.

So what should you do? NOT use version control for your larger files? That’s silly. Version control is best-practice for a reason, and you can’t simply stop doing it on larger files.

Enter a Git extension ready to save the day: Large File Storage (ie., Git LFS.)

Git LFS and efficient large file handling

Git LFS takes the burden of large data storage off of your local repository and hands it over to a remote server. That means you can keep doing the same best-practices with version control while keeping your local repository a lean, mean, storing machine.

To do this, LFS uses tiny pointer files in place of real file data. In other words, it only provides the files that are necessary when checking a revision. When you check a revision, LFS looks up the original file (on the server or in its own cache) and downloads it for you. And voila! You have access to the files you actually need without a bunch of other data weighing down your local repository.

Installation

To install the LFS extension plugin for Git:

On Windows

  1. You'll need the installer for Windows
  2. Run git lfs install

On Mac OSX

  1. brew install git-lfs
  2. git lfs install

On Ubuntu

  1. sudo apt-get install git-lfs
  2. git lfs install

On CentOS

  1. sudo yum install git-lfs
  2. git lfs install

Git LFS for Backlog

Git LFS is available on all cloud-based plans (including our Free and Classic plans.) Future plans for Git LFS on Enterprise plans is still to be determined.

Files saved to Git LFS are included in the max storage capacity of each plan. For more storage capacity, you can always upgrade to a higher plan.

How to setup files managed by Git LFS

The following command will manage the current repository .psd file with Git LFS.

$ git lfs track "*.psd"

 

And that’s it! Everything after this is the same as your normal Git development workflow.

We hope you enjoy the extra space on your local repositories!

Brandi Gratis Brandi is a Content Marketing Manager at Nulab — the creators of Backlog, Cacoo, and Typetalk. She regularly contributes and edits content for all of Nulab's websites and blogs.