Can I exclude some files from git-lfs?
I was looking for the same. I am using git
version 2.26.2 and rkedge's answer did not work for me. I found this thread and ended up using:
*.dat filter=lfs diff=lfs merge=lfs -text
excluded.dat !filter !diff !merge text
For files already commited, I had to untrack and re-commit them after modifying .gitattributes
.
.gitattributes
works similarly to .gitignore
in terms of precedence.
* filter=lfs diff=lfs merge=lfs -text
.gitignore filter= diff= merge= text
.gitattributes filter= diff= merge= text
This will unset the filter, diff, merge for those files, and lfs won't track them.