github clone has a specified directory under a certain warehouse
淡淡烟草味
淡淡烟草味 2017-05-02 09:27:43
0
4
701

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

淡淡烟草味
淡淡烟草味

reply all(4)
过去多啦不再A梦

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

Ty80
// mybranch 指定的仓库名称
git clone -b mybranch --single-branch git://sub.domain.com/repo.git
巴扎黑

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
过去多啦不再A梦

Handling the same as other language clients!
Window:

Linux:

Git:

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template