# Git LFS "git-lfs: command not found" from filter-process in CI

> Fix "git: 'lfs' is not a git command" / "git-lfs: command not found" in CI - the git-lfs binary is not installed on the runner, so the filter cannot run.

Source: https://latchkey.dev/learn/command-reference/git-lfs-filter-process-command-not-found-in-ci  
Updated: 2026-06-30

git invoked the LFS filter but the `git-lfs` executable is not on the runner PATH. Without the binary, the smudge/clean filters cannot run and checkout of LFS files fails.

## Using this in CI

CI checkouts are shallow and detached by default, which changes the answer this command gives you. Commands that read history, branch names, or tags need the checkout configured for it.

```.github/workflows/ci.yml
- uses: actions/checkout@v4
  with:
    fetch-depth: 0   # history, tags, and git describe all need this

- run: |
    git rev-parse --is-shallow-repository   # expect false
    git rev-parse --abbrev-ref HEAD          # prints HEAD when detached
```

> `git rev-parse --abbrev-ref HEAD` returns the literal string `HEAD` on a detached checkout rather than a branch name. On GitHub Actions read `github.ref_name` instead; the git command cannot know what it was checked out for.

## FAQ

### What causes Git LFS "git-lfs: command not found" from filter-process in CI?

There are 2 common causes: git-lfs is not installed on the runner image and git-lfs is installed but not initialized. A slim or self-hosted image ships git but not the separate git-lfs package, so the filter command does not exist.

### How do I fix Git LFS "git-lfs: command not found" from filter-process in CI?

There are 2 fixes depending on which cause you have: install and initialize git-lfs and use a runner image that bundles git-lfs. Work through them in order, since the first is the most common.

### What does Git LFS "git-lfs: command not found" from filter-process in CI actually mean?

checkout fails with "git: 'lfs' is not a git command" or "git-lfs: command not found", often as "error: external filter 'git-lfs filter-process' failed".

### How do I stop Git LFS "git-lfs: command not found" from filter-process in CI happening again?

Include git-lfs in self-hosted and container runner images. The prevention section lists 3 changes that keep it from recurring.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
