1写在前面
用过github
的小伙伴们都知道,我们可以通过git clone
命令来下载整个项目到本地。😘
但我最近在使用github
的时候遇到一个问题,就是我只想下载这一个文件,其他的我都不想要。🫠
![alt](https://img-blog.csdnimg.cn/img_convert/8dded769d824afd3f3595b77f452182f.png)
解决方案大家往下看吧:👇
2解决方案一(raw)
1️⃣ 首先我们点开这个文件,点击raw
。🤜
![alt](https://img-blog.csdnimg.cn/img_convert/bdf8d9bf371c0f40c990f4476ccf4fe9.png)
2️⃣ 然后我们右键选择另存为,就可以下载啦。😉
![alt](https://img-blog.csdnimg.cn/img_convert/1669205af3fe8d72fa82663858fb545c.png)
3解决方案二(GitZip)
1️⃣ 这里我们需要安装一个谷歌插件,GitZip for github
。🥰
2️⃣ 这个时候你的github
上的文件前面就会有个小框框啦。🌈
![alt](https://img-blog.csdnimg.cn/img_convert/f35609c6173868b835c5ceff187269f8.png)
3️⃣ 选中你需要下载的文件或者文件夹吧。😁
![alt](https://img-blog.csdnimg.cn/img_convert/aeefbeb3fae8206c35d680146077e630.png)
4️⃣ 页面的右下角有下载按钮,完美解决!🤟
![alt](https://img-blog.csdnimg.cn/img_convert/f064b89502c623f7f0bd2b61c7f934b1.png)
🌟 补充!这个插件还有在线网站可用:👇
http://kinolien.github.io/gitzip/
![alt](https://img-blog.csdnimg.cn/img_convert/137298df95c4485b5f1d43d19926b854.png)
4解决方案三(DownGit)
这个方法不需要安装任何插件,登陆以下网站即可:👇
https://minhaskamal.github.io/DownGit/#/home
![alt](https://img-blog.csdnimg.cn/img_convert/30799b9162fc61556d06739dd17026b9.png)
在这里输入你需要下载文件或文件夹的路径就行啦。😘
这里再补充一个类似的网站,上面的网址登不上的时候可以试一下这个:👇
https://blog.luckly-mjw.cn/tool-show/github-directory-downloader/index.html
![alt](https://img-blog.csdnimg.cn/img_convert/c61d4bf21295581c485d8f7ae9ca9be1.png)
5解决方案四(SVN)
最后介绍一个通过代码获取的方式。🤒
1️⃣ 首先你需要安装SVN
,这里我的电脑上安装了homebrew
,所以直接通过命令安装了哈。🤜
brew install svn
2️⃣ 然后你需要定位一下这个目录,复制一下它。👀
![alt](https://img-blog.csdnimg.cn/img_convert/0bf8bcfedef27b48921805aed35f1e79.png)
3️⃣ 这个时候需要注意了,把 tree
改成 branches
,然后执行 svn export
:
svn export https://github.com/danro9685/CIMLR/branches/Matlab/src
![伏特加](https://img-blog.csdnimg.cn/img_convert/b1c89357ad377e12f12221a6fd785dbb.png)
需要插件的小伙伴,在公众号回复
GitZip
获取吧!点个在看吧各位~ ✐.ɴɪᴄᴇ ᴅᴀʏ 〰
本文由 mdnice 多平台发布