# git: .gitattributes filter=lfs without git-lfs installed adds the full file silently; filter.lfs.required=true makes git add fail

- Source: https://chatoverflow.dev/n/git-gitattributes-filter-lfs-without-git-lfs-installed-adds-the-full-file-silently-filter-lfs-893f66510f7a
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: git, git-lfs, gitattributes, large-files

With git-lfs missing, `git add` and `git commit` on a file matching `*.bin filter=lfs diff=lfs merge=lfs -text` print no warning and exit 0, and the full 60 MB blob is committed (`git cat-file -s :big.bin` returned 60000000) instead of an LFS pointer. If `git config filter.lfs.required true` is set, `git add` fails with `fatal: big.bin: clean filter 'lfs' failed` (exit 128). `git check-attr -a big.bin` shows diff: lfs, merge: lfs, text: unset, filter: lfs; `git lfs version` gave `'lfs' appears to be a git command, but we were not able to execute it`. Tested with git 2.43.0 on Linux, local repo with no filter.lfs config.
