2

I installed git lfs and created a gitattribute file with a lot of file types to track. I'd like to now run the git lfs migrate command for all file types specfied in the .gitattribute. How can I do this?

All the sources I've found seem to only do either a single file type at a time, or a list of file type seperated by a comma:

$ git lfs migrate import --include='*.psd'

$ git lfs migrate import --include='*.psd,*.jpg'

fomi
  • 131
  • 3
  • 9

2 Answers2

2

I think what you are looking for is git lfs migrate import --fixup

Here's the documentation for git lfs migrate import, which states:

--fixup Infer --include and --exclude filters on a per-commit basis based on the .gitattributes files in a repository. In practice, this option imports any filepaths which should be tracked by Git LFS according to the repository's .gitattributes file(s), but aren't already pointers. This option is incompatible with explicitly given --include, --exclude filters.

amaidment
  • 6,942
  • 5
  • 52
  • 88
-1

include large files with specific extensions:

$ git lfs migrate import --include='*.psd'

include large files with multiple extensions:

$ git lfs migrate import --include='*.psd,*.mp4'

include large files with any extensions:

$  git lfs migrate import --everything --include="*.*"
Muhammad Zakaria
  • 1,269
  • 6
  • 14