A pain point
As we all know, GitHub is a huge open source repository, and a gathering place for programmers and programming enthusiasts, including many excellent open source projects I recommended before, all of which are located on GitHub.
But whenever we see good open source projects, we are ready to goNext (BAI) load (Piao)You will find that
git cloneIs extremely slow! As far as I’m concerned, in my family’s 200m mobile broadband environment, I haven’t found that the speed of cloning open source projects is faster than that
20.00 KiB/sIt’s really hard.
It’s OK for small projects. I don’t care if I wait for a few minutes. Once the project becomes large or the number of project files increases,
git cloneMaybe the rate will fail!
Of course, the commonly used methods such as modifying hosts and agents on the Internet are not necessarily good and unstable.
Code cloud is a good thing
Next, we introduce a method to speed up GitHub Download: through the domesticCode cloud platformTo complete the download acceleration of GitHub project.
Thank you for your ideas
(1) First of all, make sure that there is an account on the code cloud, which can be used normally. If not, you can register by yourself.
(2) Click the plus sign of new warehouse in the upper right corner
+, select “from
GitHub/GitLabImport warehouse menu
This stepGive it to code cloudAs like as two peas, the speed is very fast. In a moment, the code cloud cloned a project that was exactly the same as GitHub.
(4) Next, we will use the project address on the code cloud to change the project
cloneWhen you get to the local area, the speed of the clone is very fast
MB/sThe speed of the project is no problem. The project will be downloaded soon.
Logically speaking, our goal has been achieved by this time, but don’t forget that there is still one thing we haven’t done.
Re associate remote address
You should know that the project cloned to the local is associated with the address of gitee, which is already connected with the original GitHub projectCompletely detachedIt’s another onecopy。
If necessary (for example, we are going to give a project on GitHub
PR）, we also need to re associate our local project with the original GitHub project, as follows:
(1) First find the hidden folder under the local warehouse directory
(2) Open with text editor
[remote "origin"].urlThe field is reassociated to the GitHub project address that was originally located on GitHub
Of course, you can also modify the remote address through the command line, the effect is the same
At this point, the local project is quite successful
cloneFrom GitHub, the following code is raised, and
PRThere’s no problem with GitHub.