LFS Policy — Large-File Storage¶
Large binary artifacts must not be committed directly to Git. Use the guidelines below to handle any file that exceeds normal size limits or is unsuitable for text-based version control.
When to Use Git LFS¶
Enable Git LFS for a file when all of the following are true:
- The file is binary (model weights, compressed archives, datasets, audio/video).
- The file must be version-controlled alongside code.
- The file exceeds 50 MB (hard limit) or 10 MB (soft recommendation).
Registering an LFS Track Pattern¶
Then commit the updated .gitattributes. All future files matching the pattern are stored in LFS.
Preferred Alternatives¶
| Artifact Type | Preferred Storage |
|---|---|
| Training run outputs | .codex/ (gitignored) |
| Model checkpoints | External DVC remote or S3 |
| Datasets | DVC-tracked, not in Git |
| CI artifacts | GitHub Actions Artifacts (30-day retention) |
Guardrails¶
- The
.dvcignorefile excludes common large-file patterns from DVC tracking. - Pre-commit hooks flag files >10 MB that are not tracked by LFS or DVC.
- Artifacts uploaded to GitHub Actions are subject to the 2 GB per-artifact limit under the GitHub Team plan.