问题:拉取项目的时候 报错
fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output
解决方法:
1.
git config --global http.postBuffer 524288000 配置git 缓存为500mb(1048576000)
git config core.compression 0 设置压缩机别 0表示无压缩,-1为zlib默认压缩值,而1-9是速度大小集中的方案,最慢的是9
git clone --depth 1 [链接] // 只拉取最近的一次提交
拉取完成后会发现没有远程分支
2.
打开项目.git文件夹 config文件中
[remote "origin"]
url = http://gitlab03.tclking.com/applications/app/android/tlive_play.git
fetch = +refs/heads/*:refs/remotes/origin/*
将fetch = 后边的替换为
+refs/heads/*:refs/remotes/origin/*
关联远程分支
或者
git fetch --unshallow
git remote set-branches origin '*'
git fetch -v
3.git pull
这样就完成代码的clone了。