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 clone
the 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/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 files more than one project, git clone
a 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/GitLab
import warehouse" menu
(3) Then fill located GitHub
on you want to clone
address of the warehouse and import
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!
(4) Next we address through a project code on the cloud, the project clone
to a local, this time the clone speed very quickly, a few MB/s
speed is no problem, just download the program quickly.
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
(2) Open a text editor .git
folder config
profile
The configuration file [remote"origin"].url
back to the original field associated with the address located on GitHub GitHub project
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 clone
from GitHub, subsequent to mention the code, put PR
to no problem on GitHub.