[英]How can I clone a git's repository subdirectory content?
I have been able to clone only a subdirectory of a git repository using sparse: 我只能使用稀疏克隆git存储库的子目录:
git init <repo>
cd <repo>
git remote add origin <url>
git config core.sparsecheckout true
echo "DEPLOY/*" >> .git/info/sparse-checkout
git pull --depth=1 origin master
Now, I would like to clone only DEPLOY directory content, not the directory itself. 现在,我只想克隆DEPLOY目录内容,而不是目录本身。 Does exist any way to do that? 有没有办法做到这一点?
No, that would still be a sparsed checkout. 不,那仍然是稀疏的结帐。
You would simply have to follow with a copy or a move of the DEPLOY
content to where you need it. 您只需要遵循复制或将DEPLOY
内容移动到需要的位置即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.