Note in advance: git lfs migrate import --include=\"*.pdf\"
does the job as git lfs ls-files
shows e6521dbea0 - large180m.pdf>
Your problem is the path you gave to git lfs migrate import
. The path you provide needs to be suitable for a .gitattributes
file, which means it must be specified in relation to the root of your repository. You provided an absolute path instead, which told Git LFS to match all the PDF files in a subdirectory called Temp
under a directory in the root of your repository called C:
. Such a directory cannot possibly exist on Windows, but could plausibly exist on a Unix system.
Instead, you want to specify the pattern as simply *.pdf
, which will affect all the PDF files in your repository, wherever they may be located.
In addition, if you have multiple branches, or even if you don't, you usually want to migrate all branches, so you should pass --everything
. So your invocation should look like git lfs migrate import --everything --include="*.pdf"
.