下载GitHub大文件时,由于GitHub没有断点下载功能,每次暂停后都重新下载,而且下载时间过长。 以下是针对大文件下载的方法:
1、使用Git下载 好像并没快。 Git软件使用指令下载最新版的代码,可以大大减少下载文件的量。例如,使用下面的代码
$
git clone --depth
=1 git@github.com:atom/atom.git
Cloning into
'atom'...
remote: Counting objects: 444, done.
remote: Compressing objects: 100%
(359/359
), done.
remote: Total 444
(delta 20
), reused 264
(delta 8
)
Receiving objects: 100%
(444/444
), 2.25 MiB
| 7.00 KiB/s, done.
Resolving deltas: 100%
(20/20
), done.
Checking connectivity
... done.
$
git clone --depth
=1 https://github.com/bcit-ci/CodeIgniter.git/localdir
2、添加github的hosts
修改文件 C:\Windows\System32\drivers\etc\hosts.
192.30.253.112 github.com
151.101.185.194 github.global.ssl.fastly.net