git-sparse-checkout
Check out only part of a repository's files instead of cloning or checking out everything. tldr-pages
On several platforms
Several platforms
Enable sparse checkout
git sparse-checkout initIdentifyDisable sparse-checkout and restore full repository
git sparse-checkout disableIdentifySpecify which directories (or files) to include
git sparse-checkout set path/to/directoryIdentifyAdd more paths later
git sparse-checkout add path/to/directoryIdentify