有时在github上不想checkout一整个项目,只想下载下来一个目录,或者单独一个文件,这时可以尝试下svn,
如果没有这个命令,安装下subversion。

比如下载下verilator的示例目录,
点开后网址显示
https://github.com/verilator/verilator/tree/master/examples
把tree/master换成trunk,执行

svn export https://github.com/verilator/verilator/trunk/examples 

或者某个branch,把tree换成branches

svn export https://github.com/verilator/verilator/branches/master/examples 

或者最后加上想保存的其它名字,如verilatorex,

svn export https://github.com/verilator/verilator/branches/master/examples verilatorex

或者某个tags

svn export https://github.com/verilator/verilator/tags/v5.014/examples  v5.014ex

当然每次都点进开看有些麻烦,终端也可以执行

svn ls https://github.com/verilator/verilator/

列出目录查看
如果github无法访问,可换成镜像站,比如

svn export  https://hub.nuaa.cf/verilator/verilator/trunk/examples

逐步被封,暂时可用,自行尝试。

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐