✓ Works

git ≥ 2.37: sparse-checkout Cone Mode Stable and Default

git ≥ 2.37 + sparse-checkout cone mode

`git sparse-checkout` was introduced in git 2.25.0 but cone mode (much faster for monorepos) became the default behavior in git 2.37.0. Initialize with `git sparse-checkout init` (cone mode is default in 2.37+), then add directories with `git sparse-checkout add `. Cone mode restricts checkout to directory boundaries and is significantly faster than arbitrary glob patterns for large repos.

Required Flags / Config

--cone (for init; default in git 2.37+, not needed explicitly)

Workarounds & Fixes

Related Error Pages

Related Combinations

git 2.43 + Ubuntu 24.04 LTS ✓ Works git 2.34 + Ubuntu 22.04 LTS ✓ Works git (latest, via Homebrew) + macOS (any supported) ✓ Works git for Windows (latest) + Windows 10 / 11 ✓ Works
Last verified: 2024-06-01  ·  Category: git + OS / Features