Loading

如何下载GitHub项目的某个目录

使用 git 只能克隆整个项目。所以得换个工具。

我的解决方案是使用 SVN

【1】找到目标目录的地址

这个很简单,在浏览器点击进入项目的目标目录,在浏览器的地址栏即可看到目录地址。

【2】修改链接

把原链接的 tree/master 改为 trunk 即可。

比如GitHub原目录地址:

https://github.com/christophomos/2D_Apple_Games_by_Tutorials/tree/master/01-sprites/starter/

应改为:

https://github.com/christophomos/2D_Apple_Games_by_Tutorials/trunk/01-sprites/starter/

使用SVN下载

在终端执行:

$ svn export https://github.com/christophomos/2D_Apple_Games_by_Tutorials/trunk/01-sprites/starter/

(请修改为你的地址)

posted @ 2020-11-18 16:45  逆行  阅读(523)  评论(0编辑  收藏  举报