Git LFS "git: lfs is not a git command" in CI
Git tried to run the LFS filter but the git-lfs binary is missing or never initialized. The checkout then leaves pointer files in place or fails outright on the smudge step.
What this error means
A clone or checkout reports git: lfs is not a git command or smudge filter lfs failed, and LFS-tracked files appear as small text pointers rather than their real content.
git
git: 'lfs' is not a git command. See 'git --help'.
error: external filter 'git-lfs filter-process' failed
fatal: <file>: smudge filter lfs failedCommon causes
git-lfs binary not installed
The runner image does not include git-lfs, so the lfs subcommand and filter are unavailable.
LFS filters not initialized
git-lfs is present but git lfs install was never run, so the smudge/clean filters are not wired into git config.
How to fix it
Install and initialize git-lfs
- Install the git-lfs package on the runner.
- Run git lfs install to register the filters before checkout.
Terminal
sudo apt-get update && sudo apt-get install -y git-lfs
git lfs installEnable LFS in the checkout action
- On GitHub Actions, set lfs: true so the action handles installation and pulling.
.github/workflows/ci.yml
- uses: actions/checkout@v4
with:
lfs: trueHow to prevent it
- Use a runner image that ships git-lfs, run git lfs install during setup, and set lfs: true on actions/checkout for any repo that uses LFS.
Related guides
Git LFS "object does not exist" in CIFix the Git LFS "Object does not exist on the server" 404 error in CI, caused by an LFS object that was never…
Git LFS "over data quota" 403 in CIFix the Git LFS "batch response: This repository is over its data quota" 403 error in CI, caused by exceeding…
Git "not a git repository" in CIFix the Git "fatal: not a git repository (or any of the parent directories): .git" error in CI when a step ru…