FULL AI ANALYSIS

Git LFS pointers committed to main branch after GitHub Actions checkout lacked LFS pull: large files missing in CI and deployed artifact

Generated Oct 13, 2026, 9:45:52 AM

Analysis summary

By default actions/checkout@v2 will fetch LFS objects only if configured (lfs: true) or if the runner environment has a cached LFS store. Changes in runner type or action updates can cause LFS objects to be omitted, leaving pointer files in the working tree. The correct, reversible fix is to ensure the checkout action fetches LFS or to run 'git lfs pull' during the job. Avoid committing large binaries directly to Git history; use LFS as intended.

Possible causes

actions/checkout running with default options that don't pull LFS objects on GitHub-hosted runners

100%

Switch from self-hosted runner (with cached LFS) to GitHub-hosted runner that lacks LFS fetch configuration

90%

LFS objects access issue (token permissions), though default GITHUB_TOKEN normally suffices for public repos

5%

Recent change in checkout action or runner environment that altered default LFS behavior

5%

Suggested fixes

1

Diagnostic step 1

Add 'with: lfs: true' to actions/checkout@v2 step in workflow to fetch LFS objects automatically (reversible change to CI config).

2

Diagnostic step 2

Alternatively, add explicit steps: 'git lfs install --local' and 'git lfs pull' after checkout to ensure LFS objects are present; this is explicit and portable across runners.

3

Diagnostic step 3

Confirm LFS access: for private LFS objects, verify GITHUB_TOKEN permissions or configure a deploy key with LFS read access and use it securely in CI (do not print or store private keys in logs).

4

Diagnostic step 4

Add CI assertion: a test step that validates critical large files are non-pointer binaries (e.g., check file magic or size > 1MB) to fail early if LFS objects are missing.

5

Diagnostic step 5

If repository contains unintended large binaries in git history, consider migrating them out using git filter-repo and enforce LFS tracking on future commits via pre-commit hooks, documented in CONTRIBUTING.md.