What is git large file storage (Git LFS)?
Why Interviewers Ask This
Candidates at the intermediate level are expected to not only know this concept but explain the trade-offs involved. Interviewers use this question to see if you can reason about design decisions, not just recall facts.
Answer
Git LFS (Large File Storage) is a Git extension that replaces large files (images, videos, datasets, compiled binaries, design files) with small text pointer files in Git, while storing the actual file contents on a separate LFS server. Git was not designed for large binary files — they inflate repo size permanently (every version of a 50MB Photoshop file is stored forever in .git/objects), make clones slow, and binary diffs are useless. With LFS: the repo contains only the pointer (a few hundred bytes); the actual binary is on the LFS server; Git LFS downloads the file transparently when you check it out. Setup: (1) Install Git LFS: git lfs install; (2) Track file patterns: git lfs track "*.psd" "*.mp4" "design/*.png" — this creates/updates .gitattributes; (3) Commit .gitattributes: git add .gitattributes && git commit; (4) Add files normally: git add assets/logo.psd && git commit. LFS-stored files appear normal in the working directory. Clone with LFS files: automatically handled. GitHub, GitLab, Bitbucket support LFS. Storage is metered separately. Alternative: keep large files out of Git entirely (store in S3, Google Drive, or artifact registries) and reference them by URL.
Common Mistake
Don't just define the term — demonstrate that you understand when to use it and when not to. Showing awareness of trade-offs is what separates average from strong Git & GitHub candidates.
Previous
What is a monorepo and how does Git support it?
Next
What is semantic versioning (SemVer) and how does it relate to Git tags?