@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)
善用谷歌 How do I clone a subdirectory only of a Git repository?
谢谢楼上,在提问之前我已经在google和stackoverflow上搜索了很久,这篇帖子我也看到了,并且尝试了好几次,貌似行不通,输入这个命令:git remote add -f origin <url> 之后就开始完全拷贝了!
@jowang2016 我还没有尝试过,不过
应该只会添加远程仓库,并不会拷贝吧?
@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)
貌似确实会拷贝所有的内容
@jowang2016 如果觉得仓库太大了,还有一个方法可以只拷贝最新的版本
@xcatliu 感谢!我再试试!
找到解决办法了,参考 http://stackoverflow.com/questions/7106012/download-a-single-folder-or-directory-from-a-github-repo