Git拉取项目太大超时下载不下来

问题:拉取项目的时候 报错

fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output

解决方法:
1.

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了。

你可能感兴趣的:(git,github)