I'm working with a repository with a very large number of files that takes hours to checkout. I'm looking into the possibility of whether Git would work well with this kind of repository now that it supports sparse checkouts but every example that I can find does the following:
git clone <path>
git config core.sparsecheckout true
echo <dir> > .git/info/sparse-checkout
git read-tree -m -u HEAD
mkdir myrepo cd myrepo git init git config core.sparseCheckout true git remote add -f origin git://... echo "path/within_repo/to/desired_subdir/*" > .git/info/sparse-checkout git checkout [branchname] # ex: master
Now you will find that you have a "pruned" checkout with only files from path/within_repo/to/desired_subdir present (and in that path).