Git LFS track folder recursively

2019-03-14 05:30发布

Is it possible to track recursively all files contained in a folder and its subfolders with Git LFS ?

I would like to do something like this :

git lfs track myfolder/*

标签: git git-lfs
1条回答
冷血范
2楼-- · 2019-03-14 06:15

Use git lfs track "myfolder/**", with quotes to avoid the shell already expanding the pattern. All that the track command does is to write to .gitattributes, which in turn uses (almost) the same pattern matching rules as .gitignore, see the PATTERN FORMAT description.

查看更多
登录 后发表回答