Matt Leaverton

Software and Electronics.

Currently Senior Software Engineer at Glowforge

Connect with me:

Initialize Git LFS

So I can remember how to do this in the future.

Enable Git LFS on a repo:

  • clone empty repo, master branch
  • cd into repo directory
git lfs install
git lfs track "*.png" "*.PNG" "*.jpg" "*.JPG" "*.jpeg" "*.JPEG" "*.zip" "*.ZIP" "*.db" "*.DB"
git add .gitattributes
git commit -m "Add LFS support to repo"
git push
git lfs push origin master
git lfs pull
  • repeat above for each existing branch
  • manually update .gitattributes in future to add more file filters as necessary

Thanks to my friend CW for the instructions.