Git推送错误:远程端意外挂起

3

我提交了两个更改,然后发现我需要拉取一些同事所做的更改。当我尝试推送时,出现以下错误:

>>> /usr/bin/git push origin HEAD:refs/heads/main
error: RPC failed; curl 55 Failed sending data to the peer
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

我尝试过但没有成功的解决方案:
git config --global http.postBuffer 524288000
git config --global http.version HTTP/1.1
1个回答

0

请尝试执行以下操作:

  1. 从您的项目中删除 .git/ 目录
  2. 将远程 repo 克隆到新位置,例如您的桌面:

3. git clone https://github.com/foo/bar.git

4. 将 .git/ 从新位置移动到旧位置,重新提交并推送更改。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接