git clone uses a proxy to achieve a hundred times speedup

Sometimes when we clone the github repository, we will find that it is very slow, even tortoise speed, which is very inefficient. Fortunately, there is a simple and quick way to double the speed of clone efficiency.

We found such a description by searching git’s help documentation

If you just want to use proxy on a specified repository, don’t need on other repositories. The preferable way is the -c, –config <key=value> option when you git clone a repository. eg

practice

 1 
git clone https://github.com/flutter/flutter.git --config "http.proxy=192.168.1.6:1611"

example above

  • Set proxy via --config "http.proxy=192.168.1.6:1611"
  • Among them, 192.168.1.6:1611 is the address of the proxy, which needs to be built by yourself or available.

The above configuration is good, and if you execute it again, you can basically get a hundred-fold increase in efficiency.

droidyue_gzh_green_png.png

This article is reprinted from https://droidyue.com/blog/2022/10/26/speed-up-git-clone-via-proxy/
This site is for inclusion only, and the copyright belongs to the original author.