A move to get GitHub download acceleration

Author: White Song

Blog: https://blog.yilon.top

A sore point

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

But whenever we see a good open source project, ready to go down (bai) load (piao) time, you will find git clonethe speed of abnormal slow! For me personally, in my home environment for mobile broadband 200M, I clone open source projects have not been found faster than 20.00KiB/swhen it is simply too uncomfortable.

img

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

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


"Code cloud" is a good thing

Then we introduce a GitHub download acceleration methods: by country code cloud platform to divert to complete the download on GitHub project acceleration.

No small thanks to the public partner to provide ideas ioc

(1) First, make sure that there is an account code on the cloud, can be used normally, no can self-register it.

(2) Click the plus sign new warehouse top right corner +, select "from the GitHub/GitLabimport warehouse" menu

img

(3) Then fill located GitHubon you want to cloneaddress of the warehouse and import

img

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

img

(4) Next we address through a project code on the cloud, the project cloneto a local, this time the clone speed very quickly, a few MB/sspeed is no problem, just download the program quickly.

img

Logically speaking 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 GitHub project has been completely out , it is another copy .

Where necessary (such as we are to an item put on the GitHub PR), we also need to re-associate our local project to the original project's GitHub up, practice is as follows:

(1) First find hidden files in the local directory under the repository folder .git

img

(2) Open a text editor .gitfolder configprofile

img

The configuration file [remote"origin"].urlback to the original field associated with the address located on GitHub GitHub project

img

Of course, you can also modify the remote address via the command line, the same effect

At this point you're done, the local project is the equivalent of clonefrom GitHub, subsequent to mention the code, put PRto no problem on GitHub.

Guess you like

Origin www.cnblogs.com/sug-sams/p/12612225.html