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) |
Current Repository BaselineΒΆ
- The repository does not force repo-wide Git LFS filters from
.gitattributes; contributors opt in by adding explicitgit lfs trackpatterns when needed. - Copilot and Codespaces startup paths default to
GIT_LFS_SKIP_SMUDGE=1so ordinary sessions do not fetch large blobs during checkout. copilot-setup-steps.ymlonly re-enables LFS onworkflow_dispatchruns whenlfs_mode=targetedorlfs_mode=fullis explicitly requested.
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.