Search code examples
gitgit-lfs

Git LFS - how to track multiple file types with one command


I see this command listed on the Git LFS website and documentation:

git lfs track "*.psd"

I have several file types in my project that I want to track with LFS, and will want to track all these same file types in future projects. I would like to be able to paste a single command to track all these extensions, is this possible?


Solution

  • After some experimentation I found this was doable by providing multiple arguments:

    git lfs track "*.jpg" "*.png"
    

    This will track both jpg files and png files