Git LFS
What is Git LFS
Git LFS (Large File Storage) is a Git tool which replaces large files with pointers in your Git databse. These pointers point to the actual file on a remote server. Using Git LFS avoids your Git repo becoming huge and awkward to handle overtime.
Using Git LFS
To use git lfs to commit these files, you will need to run git lfs install
your git user account on your machine. You will only need to do this once.
To add file types for git lfs to handle run:
git lfs track "*.xxx"
git add .gitattributes
Do this BEFORE commiting any files of this type
Common Issues
Encountered a file that should have been a pointer but wasn’t
This usually occurs when a user does not have Git LFS installed and has pushed a filewhich Git LFS is tracking to the Git databse.
To fix this, run the following:
git lfs migrate import --no-rewrite "PATH TO FILE"