Git & GitHub Interview Question #115
What is Git LFS?
Advanced GitHub Actions, Repository Internals, Submodules, LFS & Diagnostic Tools Senior Advanced
Quick Interview Answer
Git Large File Storage, or Git LFS, is an extension designed for versioning large binary files without storing every large file version directly as a normal Git blob in the main repository history. Git stores small pointer files while LFS manages the associated large content.
Detailed Explanation
Git Large File Storage, or Git LFS, is an extension designed for versioning large binary files without storing every large file version directly as a normal Git blob in the main repository history. Git stores small pointer files while LFS manages the associated large content.
It is commonly considered for assets such as large media or binary datasets. Teams must ensure contributors and deployment environments have the required LFS support and that storage and bandwidth limits are understood.
Code Example
git lfs install
git lfs track "*.psd"
git add .gitattributes
git add design.psd
git commit -m "Track design files with Git LFS"