# Git push "exceeds GitHub's file size limit" (LFS not tracking) in CI

> Fix "this exceeds GitHub's file size limit of 100.00 MB" in CI - a large file was committed as normal git content instead of being tracked by LFS.

Source: https://latchkey.dev/learn/command-reference/git-lfs-exceeds-file-size-limit-in-ci  
Updated: 2026-06-30

GitHub rejects a push because a file exceeds the 100 MB hard limit. The file was committed as regular git content; it needs to be tracked by LFS so only a pointer lands in the repository.

## 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 push "exceeds GitHub's file size limit" (LFS not tracking) in CI?

There are 2 common causes: the file is not covered by an lfs track pattern and the large blob is already in history. No .gitattributes rule matches the path, so git stored the full content and the push hit the hard size limit.

### How do I fix Git push "exceeds GitHub's file size limit" (LFS not tracking) in CI?

There are 2 fixes depending on which cause you have: track the pattern and migrate history and do not commit build artifacts at all. Work through them in order, since the first is the most common.

### What does Git push "exceeds GitHub's file size limit" (LFS not tracking) in CI actually mean?

A push (often from a CI bot committing artifacts) fails with "remote: error: File X is 145.00 MB; this exceeds GitHub's file size limit of 100.00 MB".

### How do I stop Git push "exceeds GitHub's file size limit" (LFS not tracking) in CI happening again?

Add LFS track rules before committing large file types. 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
