$ git push -u origin main
Enumerating objects: 2602, done.
Counting objects: 100% (2602/2602), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2602/2602), done.
client_loop: send disconnect: Connection reset by peer/s
fatal: sha1 file '<stdout>' write error: Broken pipe KiB/s
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
在git push 时总时出现这样的错,其实原因是文件过大导致的;
原因:http.postBuffer默认上限是1m,所以我们将上限变大就可以了
解决办法:
git config --global http.postBuffer 524288000
这里将buffer改为500m。