git clone提速

发布时间 2023-04-13 15:01:44作者: Haowen_Zhao

由于服务器不能随意代理,故需要通过替换url为镜像来提高速度

比如:https://github.com/riscv-software-src/riscv-tests.git

我们想替换为:git clone https://hub.yzuu.cf/riscv-software-src/riscv-tests.git

即https://github.com/替换为https://hub.yzuu.cf/

则运行:

git config --global url."https://hub.yzuu.cf".insteadOf https://github.com

之后运行vim ~/.gitconfig可以看到config: