Create and initialize your new repository:
$> mkdir <repo> && cd <repo> $> git init $> git remote add –f <name> <url>
Enable sparse-checkout:
$> git config core.sparsecheckout true
Configure sparse-checkout by listing your desired sub-trees in .git/info/sparse-checkout:
$> echo some/dir/ >> .git/info/sparse-checkout $> echo another/sub/tree >> .git/info/sparse-checkout
Checkout from the remote:
$> git pull <remote> <branch>
1 thoughts on “Checkout subtree”