# Git LFS filters not registered ("git lfs install" not run) in CI

> Fix Git LFS pointers left in the tree because "git lfs install" was never run in CI - without it, the clean/smudge filters are not registered even when git-lfs is present.

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

The `git-lfs` binary can be present yet inert: until `git lfs install` registers the clean and smudge filters in git config, checkouts leave pointer text and commits store raw content.

## 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 filters not registered ("git lfs install" not run) in CI?

There are 2 common causes: git lfs install was never executed and a restricted config scope. On a fresh container or a new user, the LFS filters are not in git config until git lfs install runs.

### How do I fix Git LFS filters not registered ("git lfs install" not run) in CI?

There are 2 fixes depending on which cause you have: run git lfs install before checkout and install at the right scope. Work through them in order, since the first is the most common.

### What does Git LFS filters not registered ("git lfs install" not run) in CI actually mean?

LFS-tracked files stay as pointer text after checkout, or git check-attr filter shows lfs but files are not materialized, and git lfs env shows the filters unconfigured.

### How do I stop Git LFS filters not registered ("git lfs install" not run) in CI happening again?

Run git lfs install during runner or image setup. 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
