Git LFS ".gitattributes filter=lfs" not applied in CI
Files that should route through LFS are stored as raw content because the filter=lfs attribute is not in effect. The .gitattributes may be missing, the pattern may not match, or LFS filters are not registered.
What this error means
git check-attr filter -- path shows no lfs filter, or committed files that should be pointers contain raw bytes despite an intended track rule.
$ git check-attr filter -- assets/model.bin
assets/model.bin: filter: unspecified
# expected: filter: lfsCommon causes
The .gitattributes rule is missing or mismatched
No committed rule matches the path, or the pattern is scoped to a subdirectory that does not cover the file, so filter=lfs never applies.
LFS filters are not registered on the runner
Without git lfs install, the clean/smudge filters are not wired up, so even a correct attribute does nothing.
How to fix it
Add the track rule and initialize LFS
- Run
git lfs trackfor the pattern so a correct.gitattributesline is added. - Commit
.gitattributes. - Ensure
git lfs installhas registered the filters on the runner.
git lfs install
git lfs track "*.bin"
git add .gitattributes
git check-attr filter -- assets/model.binCorrect the pattern scope
Make the track pattern broad enough to match the file, or place a .gitattributes in the right directory so the rule applies.
How to prevent it
- Commit
.gitattributeswith correctfilter=lfspatterns. - Run
git lfs installduring runner setup. - Verify with
git check-attr filterin CI for critical paths.