Common github acceleration methods are to modify hosts, agents and other methods, but the actual effect is not good, and unstable. Here is a very powerful method — through the domestic “code cloud” platform transfer, to complete the GitHub project download acceleration.
- First you have to register your account on the code cloud
- After registering, click the “+” sign next to the user’s profile picture and select the “Import repository from GitHub/GitLab” menu
- Then fill in the address of the repository you want to clone on GitHub and import it
- Import this step to the code cloud to do is very fast, after a while, the code cloud cloned a GitHub exactly the same project!
- Next, clone the project to the local through the project address on the code cloud. At this time, the clone speed is very fast, a few MB/s speed is no problem, and the project will soon be downloaded. That’s amazing speed!!
Re-associate the remote address
- Because the clone project just now is on the code cloud, so the remote address is still on the code cloud when submitting the code. When necessary (such as when we are giving PR to a project on GitHub), we also need to re-associate our local project with the original GitHub project as follows:
- Start by finding the hidden folder located in the local repository directory.git
- Open the config configuration file in the.git folder with a text editor
Re-associate the [remote “Origin”]. Url field in the configuration file with the GitHub project address that was originally located on GitHub
After the change:
Of course, you can also change the remote address through the command line, the effect is the same
Now that you’re done, the local project is pretty much a clone from GitHub, with no problems with code and PR.