在推送一些陳舊的、好久沒更新的git庫時,git可能會報以下錯誤:
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500
send-pack: unexpected disconnect while reading sideband packet
這個時候可以判斷是本地git緩存超了,對遠耑發了一個不完整的數據包。
需要把git配置緩存弄高一些,具體命令:
git config --global http.postBuffer 524288000
如果你在本地安裝過git,在sourcetree軟體上也用了一個獨立的git,這個命令也會生效。