我用一些图像文件创建了一个仓库。我有要从 lfs 中排除的 .gitignore 和 .gitattributes。所以我需要通过 lfs 跟踪所有文件,而不是 .gitignore 和 .gitattributes。
我正在使用 Sourcetree,我在 .gitattributes 中尝试过:
.gitignore text
.gitattributes text
* filter=lfs diff=lfs merge=lfs -text
但是我的所有文件都被 lfs 跟踪。
最佳答案
.gitattributes
与 .gitignore
类似在优先级方面。
* filter=lfs diff=lfs merge=lfs -text
.gitignore filter= diff= merge= text
.gitattributes filter= diff= merge= text
这将取消设置这些文件的过滤器、差异、 merge ,并且 lfs 不会跟踪它们。
关于git - 我可以从 git-lfs 中排除一些文件吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57595420/