第一种 如果浅克隆最近一次提交不会超过1G那就浅克隆
//浅层clone代码 depth 1只会拉取最后一次log, depth(后面数字越大拉取的历史记录越多)
1.git clone --depth 1 远程地址
//拉取完整当前分支
2.git fetch --unshallow
利用远程分支名称拉取
git branch -a
git remote set-branches origin '远程分支名称'
git fetch --depth 1 origin 远程分支名称
git checkout 远程分支名称
第二种 终极解决办法
1.网页上下载git项目zip包
2.解压出来
3.初始化git
git init .
4.加载git地址remote
git remote add 项目地址
5.更新git项目
备注
在加一条,上述方法都不行就可能是网络问题,切一下网试试