The closest thing you can do is using sparse control , which means using Git 1.7+, and you still need to clone the repo (or use the clone
--depth
option to make a small clone). By going mainly from this answer , you can do the following:
git clone --no-checkout <URL to git repo> myrepo cd myrepo git config core.sparseCheckout true vim .git/info/sparse-checkout
If you have Git version 1.7.7-rc0 or later, you can set configuration parameters using the clone
command:
git clone --config core.sparseCheckout=true --no-checkout <URL to git repo> myrepo
Also see the following:
source share