本文共 615 字,大约阅读时间需要 2 分钟。
不小心删了本地仓库,重新git clone的过程中非常耗时,且常出现因连接问题导致clone失败,真是恼人!
报错如下:error: RPC failed; curl 18 transfer closed with outstanding read data remainingfatal: The remote end hung up unexpectedlyfatal: early EOFfatal: index-pack failed
把克隆深度设置为1,只包含最近的一次commit的一个分支,然后再fetch,可以解决因.git文件过大导致的clone失败。
git clone [project address] --depth 1cd [project path]git fetch --unshallow
如果有需要,提供传送门:
转载地址:http://ygiqi.baihongyu.com/