背景
我们有时候需要下载GitHub中某个仓库的部分目录而不是整个,怎么办?
方法1
- 使用 https://minhaskamal.github.io/DownGit/#/home
在GitHub中切换好你要下载的分支,进入到你要下载的GitHub的目录,拷贝网页链接到DownGit的输入框中
直接在该网站点击 Download 即可下载(也可以复制下载链接后在浏览器打开或下载工具中打开)
注意:下载看来是经过了第三方的网站,有可能会在这个网站留下下载日志甚至下载包。不过由于是外国的网站比起国内的网站可信一点。
- 使用 http://blog.luckly-mjw.cn/tool-show/github-directory-downloader/index.html
方法同上。不过这个是国人的(请自行斟酌风险)
方法2(麻烦一些,但是是最保险的)
假设要下载的仓库是
- master分支:
https://github.com/xxxxx/test-download-partial-dir/tree/master/resource1
替换/tree/master/
为/trunk/
得到 https://github.com/xxxxx/test-download-partial-dir/trunk/resource1
在命令行中使用svn checkout 这个地址
- develop分支:
https://github.com/xxxxx/test-download-partial-dir/tree/develop/resource1
替换/tree/develop/
为/branches/your_branchname/
比如替换成 https://github.com/xxxxx/test-download-partial-dir/branches/develop/resource1
然后用svn checkout 这个地址
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/135103.html