Skip to content

Git LFS

Medium — good to knowGit & Version Control

ELI5 - The Vibe Check

Git LFS is what you reach for when you need to version control files git was never really designed for, huge binary assets like design files, videos, or trained model weights. Instead of storing the actual multi-gigabyte file in every single commit forever, which would make cloning the repo take an eternity, git tracks a tiny text pointer, and the real file lives in separate LFS storage, downloaded only when you actually check it out.

Real Talk

Git Large File Storage (LFS) is an extension that replaces large binary files in a git repository with small text pointer files, while storing the actual file content in a separate LFS server, fetched on demand during checkout rather than embedded in every commit and clone. It's configured per file pattern via .gitattributes and is commonly used for design assets, datasets, and model checkpoints that would otherwise bloat repository size and clone time far beyond what plain git handles well.

Show Me The Code

$ git lfs track "*.psd" "*.mp4"
$ cat .gitattributes
*.psd filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text

When You'll Hear This

"Track those design exports with LFS before someone commits a 200MB PSD directly." / "Clone times tanked once the model checkpoints went into LFS."

Made with passive-aggressive love by manoga.digital. Powered by Claude.