Sparse, partial, shallow, LFS — four ways to handle big
The Linux kernel repo is 5 GB. The Chromium repo is 30+ GB. Game asset repos can be hundreds of GB. Plain git clone on these is painful or impossible on a normal laptop. Git has four mechanisms to deal with size, each solving a different problem. Knowing which one to reach for matters.
Shallow clone (git clone --depth N) downloads only the most recent N commits. Fastest clone, smallest download, useful for one-off CI runs and demos. The cost: git blame, git bisect, and most history queries become inaccurate or impossible. Use shallow only when you genuinely do not need history. Promote to full history with git fetch --unshallow when needed.
Partial clone (git clone --filter=blob:none and friends) downloads commit + tree objects but defers blob fetching until checkout. Modern, available since Git 2.20. Better than shallow for most workflows: history queries that do not need blob content stay fast, and blobs are fetched on-demand when you actually look at files. --filter=tree:0 defers tree downloads too, useful for very narrow checkouts.
Sparse checkout chooses which paths from the repo's tree are materialized in your working directory. Combined with partial clone, it gives you a tiny working tree even from a giant repo. git sparse-checkout init --cone and git sparse-checkout set frontend/ docs/ populate only those paths. Used by monorepos to give each engineer a focused workspace.
Git LFS ("Large File Storage") replaces big binary files (videos, datasets, design assets) with small pointer files in the Git repo, while the actual binaries live on a dedicated LFS server. Required for binary-heavy projects because Git's diffing/packing is optimized for text. Track filetypes with git lfs track "*.psd", install git-lfs hooks once, and pushes/pulls automatically route binaries to LFS storage.