【发布时间】:2019-05-16 07:24:33
【问题描述】:
我只想从 GIT 存储库 https://github.com/intel/caffe 中克隆版本“Caffe_v1.1.4”。能否请您告诉我用于将内容复制到本地文件夹的脚本。
【问题讨论】:
标签: git github tags release git-clone
我只想从 GIT 存储库 https://github.com/intel/caffe 中克隆版本“Caffe_v1.1.4”。能否请您告诉我用于将内容复制到本地文件夹的脚本。
【问题讨论】:
标签: git github tags release git-clone
Windows 在您的浏览器中打开https://github.com/intel/caffe/archive/1.1.4.tar.gz
对于 linux 操作系统 curl -s https://github.com/intel/caffe/archive/1.1.4.tar.gz 应该可以工作
Windows PowerShell
$AllProtocols = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12' //for https support
[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols
Invoke-WebRequest http://github.com/intel/caffe/archive/1.1.4.zip -OutFile yourpath\caffe.zip
【讨论】:
“克隆”,如果你的意思是“git克隆”存储库,
git clone -b 1.1.4 --single-branch https://github.com/intel/caffe.git
您还可以添加选项--depth=1 以最小化获取数据的大小。
如果你的意思是“下载”源代码,
curl -LOk https://github.com/intel/caffe/archive/1.1.4.zip
unzip 1.1.4.zip -d foo
【讨论】: