How to clone the specified directory under the Github repository. I don’t want to clone the entire directory, I just need to modify a certain directory. How can I do it
过去多啦不再A梦2017-05-02 09:29:43
A warehouse is the only git. git clone is an operation on git and can only be the entire download. git cannot achieve your needs
PHP中文网2017-05-02 09:29:43
// mybranch 指定的仓库名称
git clone -b mybranch --single-branch git://sub.domain.com/repo.git
巴扎黑2017-05-02 09:29:43
Can achieve:
mkdir myrepo
cd myrepo
git init
git config core.sparseCheckout true
git remote add -f origin git://...
echo path/to/subdir/*> .git/info/sparse-checkout
git checkout branchname