GitHub Error: RPC failed; curl 92 http/2 stream 0 was not closed cleanly: CANCEL (err 8) | send-pack: unexpected disconnect while reading sideband

GitHub Error: RPC failed; curl 92 http/2 stream 0 was not closed cleanly: CANCEL (err 8) | send-pack: unexpected disconnect while reading sideband

我正在使用 GitHub 存储库开发一个项目。在过去的 3 个月里,我已经能够毫无问题地“添加 *”、“提交”和“推送”所有内容。现在我下载了一个包含大约 12 GB 数据的数据集,并为其创建了一个新文件夹。

我对存储库中已有的文件做了一些小改动(3 个月),并做了“添加 *”、“提交”和“git 推送”。

在对对象进行计数和压缩后,Git Bash 抛出了这个错误:

GitHub Error: RPC failed; curl 92 http/2 stream 0 was not closed cleanly: CANCEL (err 8)
send-pack: unexpected disconnect while reading sideband packet
...
fatal: the remote end hung up unexpectedly
Everything up-to-date

这可能是在写入对象时发生的。

我试过以下方法:

在对上述所有解决方案进行最新尝试后,在写入对象的 50% 后抛出了这个额外的错误:

remote: fatal: pack exceeds maximum allowed size

A screenshot of the error on Git Bash

所以,我的问题是: 1。为什么会这样? 2. 如何解决 around/solve 这个问题并成功将我当前的工作区推送到 GitHub?

我通过本教程绕过它解决了这个问题:

https://githowto.com/removing_commits_from_a_branch

注意:请记住在继续之前复制您的代码。您仍然可以返回,因为您没有删除提交,但是当您必须按照本教程进行两次操作时,这很烦人。

另外:git hist 命令是一个别名。这是我复制的:

git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short"

LINK: https://gist.github.com/ecasilla/9669241

1. Why is this happening?

  • 因为您正在尝试推送一个大文件。 (12 GB 数据集)

2. How can I work around/solve this problem and successfully push my current workspace onto GitHub?

  • 您可以使用 Git Large File Storage 将音频样本、视频、数据集和图形等大文件替换为 Git 中的文本指针,同时将文件内容存储在远程服务器上,例如 GitHub.com