起因是为了本地编译Pytorch
只能github上完整的进行clone
git clone https://github. com/pytorch/pytorch.git --recursive
但由于pytorch实在是嵌套子模块太多了
故弃之!
完美解决办法
- 修改文件
Windows:
%homepath%\.gitconfig
Linux:~/.gitconfig
在.gitconfig文件中添加以下字段:
[url "https://hub.fastgit.xyz/"]
insteadOf = https://github.com/
其中https://hub.fastgit.xyz/地址是镜像地址
如果挂了参考此篇博文:
https://blog.csdn.net/Ejzq1/article/details/123560340
替换新的镜像地址
完美解决包括--recursive
在内的git命令太慢
无需改什么子模块.gitmodules
文件
-
效果图:
-
解决证书校验问题
git config --global http.sslVerify false