Git LFS
Keeps big binaries out of the repository history and stores pointers instead.
Homebrew formula Direct download
What it does
Git stores every version of every file forever, which makes a repository containing video, RAW photos or disk images unusable within months. LFS replaces tracked binaries with small text pointers; the real objects live on a separate LFS endpoint and are fetched on checkout.
git lfs install # one-time, per machine
git lfs track "*.mp4" "*.braw"
git add .gitattributes
git lfs ls-filesNotes
- Tracking must be set up before committing the file; converting existing history needs
git lfs migrate(a history rewrite). - GitHub’s LFS storage and bandwidth are metered separately from repository size, and bandwidth is the quota people actually hit.
Alternative to
| Alternative | Type | Trade-off |
|---|---|---|
| git-annex | Open source | More flexible, considerably harder to learn |
| DVC | Open source | Built for datasets and ML pipelines rather than assets |
| Perforce Helix | Paid | What studios use when binaries are the majority of the repository |
| Keeping binaries out of Git entirely | — | Object storage plus a manifest, and often the right call |
Install
brew install git-lfs