git clone时,文件较大,网速相比较慢
缓存区溢出 命令行输入
git config http.postBuffer 524288000
如果依旧clone失败,考虑可能原因2:网络下载速度缓慢 命令行输入
git config
git config
如果依旧clone失败,则首先浅层clone,然后更新远程库到本地
git clone
git fetch
后续:git clone --depth=1 git地址 本地仓库无法获取远程分支,修改.git/config 文件,把 fetch 改成下面第二种形式,不要写死master。
将
[remote "origin"]
url = https://github.com/xxx/project.git
fetch = +refs/heads/master:refs/remotes/origin/master
改为
[remote "origin"]
url = https://github.com/xxx/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
重新git pull 就可以获得远程分支了