How to use LFS

3.4. How to use LFS#

  • 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 .gitattributes file to manage file attributes and specify LFS management for certain files. Example .gitattributes entries 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.