Git LFS(Large File Storage,大文件存储)是一个扩展,用于在 Git 中高效处理大型二进制文件(视频、数据集、设计资源、大型二进制文件)。Git 的设计初衷是处理文本/源代码,对大型二进制文件的处理效率低下,因此 LFS 将它们分离存储,同时在仓库中保留轻量级引用。
问题:Git 和大型二进制文件
Git stores every version of every file in its history (the full content):
→ LARGE BINARY files (videos, datasets, PSDs, big binaries) bloat the repo ENORMOUSLY:
- every change stores another full copy (binaries don't diff well)
- the repo and EVERY clone become huge and slow (clone/fetch download all history)
- history can't be shrunk easily (the large blobs are permanent)
→ Git is great for source code (text, diffable), POOR for large binaries.
