The git clone project files are too many and too large to download


git clone {
    
    url} 

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

一般这种情况都是因为项目分支过多,导致你要下载的东西太多,从而引起这个问题。

引起这个问题的根源是文件过多,所以我们可以分批次下载文件,先下载一部分,再下载剩下的。

解决方案如下

1,首先关闭 core.compression
  git config --global core.compression 0

2,然后使用depth这个指令来下载最近一次提交
  git clone --depth 1 url

3,然后获取完整库
  git fetch --unshallow 

4,最后pull一下查看状态,问题解决
  git pull --all

Guess you like

Origin blog.csdn.net/lixu1119545729/article/details/125095908