CNode

clone github仓库时,如何只克隆仓库的一部分?

问答
Jjowang2016发布于10 年前最后回复10 年前7 回复5621 浏览0 收藏

有的github仓库文件特别多,只想clone一部分文件,该如何做到呢?

查看回复

回复 (7)

J
jowang2016#2·10 年前

谢谢楼上,在提问之前我已经在google和stackoverflow上搜索了很久,这篇帖子我也看到了,并且尝试了好几次,貌似行不通,输入这个命令:git remote add -f origin 之后就开始完全拷贝了!

X
xcatliu#4·10 年前
引用 jowang2016谢谢楼上,在提问之前我已经在google和stackoverflow上搜索了很久,这篇帖子我也看到了,并且尝试了好几次,貌似行不通,输入这个命令:git remote add f origin...

@jowang2016 It is an improvement but still needs to download and store a full copy of the remote repository in origin, which one might like to avoid at all if he is interested only in portions of the codebase (or if there is documentation subfolders as in my case)

貌似确实会拷贝所有的内容

参与回复
登录后即可参与回复。登录