git sparse-checkout
SafePartial checkouts
git sparse-checkout set <dir>
Materializes only chosen paths from a huge monorepo; pair with clone --filter for light fetches too.
Examples
git clone --filter=blob:none --sparse <url> && git sparse-checkout set services/apiFetch just one service
Syntax
git sparse-checkout init|set <paths> / disable
Before you run it
Changes only what's checked out.
Related commands
- git cloneClone a repo
- git worktreeMultiple working trees
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store