在克隆比較大的倉庫時Git報錯,如下:
git.exe clone --progress -v "https://github.com/yyhsong/iDataV.git" "E:\WorkSpace\iDataV"
Cloning into 'E:\WorkSpace\iDataV'...
POST git-upload-pack (174 bytes)
POST git-upload-pack (212 bytes)
remote: Enumerating objects: 95, done.
remote: Counting objects: 100% (95/95), done.
remote: Compressing objects: 100% (77/77), done.
error: 6244 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: index-pack failed
git 未能順利結束 (退出碼 128) (710188 ms @ 2021/3/3 星期三 下午 2:24:52)
解決方法:
1.
git config --global core.compression 0
2.
git clone --depth 1 <repo_URI>
3.
git fetch --unshallow
4.
git fetch --depth=2147483647
5.
git pull --all
按照步驟操作即可,本人親測可以。