3.4. How to use LFS#
Adding tracked files
Regularly tracked files need to be untracked first, before they can be tracked with git LFS:
git rm --cached "data.csv"
git lfs track "data.csv"
git add "data.csv"
Install Git LFS from git-lfs.github.com and initialize it with
git lfs install.Track large files by specifying file types, e.g.,
git lfs track "*.pdf".Add the
.gitattributesfile to manage file attributes and specify LFS management for certain files. Example.gitattributesentries for images and videos:*.jpg filter=lfs diff=lfs merge=lfs -text *.png filter=lfs diff=lfs merge=lfs -text *.mp4 filter=lfs diff=lfs merge=lfs -text
Add, commit, and push large files using Git LFS.