A move to get GitHub download speed

As we all know, GitHub is a huge treasure trove of open source, programmers and programming enthusiasts as well as a gathering place, a lot of good open source projects are all located on GitHub.

Click to access personal blog

But whenever we see a good open source project, ready to go down (white) load (prostitution), you will find git clone unusually slow speed! For me personally, I have not found that cloned open source project faster than over 10KB / s, when it is simply too uncomfortable.

Small projects just fine, I'll wait a few minutes does not matter; it once the project is huge, or the number of more than one project file, git clone large probability will fail!

Of course, online common modifications such as hosts, agents, etc. actual effect is not good, but not stable.

Then we introduce a GitHub download acceleration method: Transfer the country code by the cloud platform, to complete the download on GitHub project acceleration.

License Cloud

First make sure there is an account code on the cloud and working properly, you can not self-register, registered account it should be very simple.

The github repository transferred to the cloud code

1. Click on the top right corner of the new warehouse plus sign +, select "from GitHub / GitLab import warehouse" menu

2. Then fill in the address of the warehouse located on GitHub you want to clone and import

3. This step is done to speed cloud code is very fast, a little while, code and clouds and cloned a project on GitHub exactly the same!

4. Next we address through a project code on the cloud, the project to a local clone, this time the clone speed quickly, the speed of a few MB / s is no problem, just download the program quickly.

This time our objective has been achieved, but do not forget, there is one thing not to do.

Re-associate the remote address

You know, this time to the cloning project is associated with the local cloud Gitee address code, and the original has been completely out of the GitHub project, it is another copy.

Where necessary, we also need to re-associate our local project to the original project's GitHub up, practice is as follows:

首先找到位于本地仓库目录下的隐藏文件夹 .git,注意这个.git文件夹是隐藏的文件夹。然后再这个文件夹下找到config配置文件.将配置文件中的[remote"origin"].url字段重新关联到原来位于GitHub上的GitHub项目地址

当然你也可以通过命令行来修改远端地址,效果一样的
至此大功告成,本地项目就相当于是clone自GitHub,后续提代码,到GitHub上都没有问题。

发布了16 篇原创文章 · 获赞 3 · 访问量 952

Guess you like

Origin blog.csdn.net/qq_39400113/article/details/104729432