Skip to main content

Git LFS

TLDR, What should I do to use it?

  • For normal user
    • don’t bother, It should work the same like other git repo
    • in SourceTree, there will be extra popup that may happen to confirm downloading files with Git LFS, just click yes
  • For developers
    • Install Git LFS
    • add files to Git LFS when it is a binary files and larger than 10 MB (usually assets or docs) when doing a commit
    • If you are unsure, you can ask the Lead Programmer

What is Git LFS

Quick Start

  1. Install git LFS

    Git Large File Storage

  2. check your git lfs version with git lfs env it is recommended to have latest version

  3. setup git lfs in your dev env with git lfs install

  4. start tracking binary file as lfs file with git lfs track "*.psd"

  5. add and commit your .gitattributesgit add .gitattributes

  6. continue using git as usual

FAQ

My Previous Binary file is not registered as git LFS

Git LFS only works for commit after it’s configuration added to commits. thus it won’t work for previous commits.

you need to migrate your entire project history to use git LFS

git-lfs/git-lfs-migrate.1.ronn at main · git-lfs/git-lfs