我忘了将更改推送到我已经连续几个月工作的项目中。这导致一个非常大的 .git 目录(〜11 GB )。存储库中其余文件的合并数量要少得多。我想将所有提交推送到github,如果不是一次又增量地推送。保持版本控制很重要,因此我不能只删除文件。
I forgot to push my changes to a project I have been working on incrementally for months. This has resulted in an extremely large .git directory (~11 GB). The rest of the files in the repo combine for much less than that. I would like to push all the commits to github, if not at one time then incrementally. Keeping the versioning is important, so I cannot just remove files.
我查看了Git LFS,但是它似乎无法检测到较大的 .git 文件。我曾尝试寻找解决方案,但大多数指向使用Git LFS修剪大文件或增加缓冲区(我的缓冲区当前为 1048576000字节或〜1GB )。这些工作都没有。
I looked into Git LFS, however it does not seem to detect large .git files. I have tried looking around for solutions, but most point to either trimming the large files, using Git LFS, or increasing the buffer (my buffer is currently 1048576000 bytes or ~1GB). None of these work.
我尝试运行 git fsck ,尽管我不这样做,但它却给了我一个悬空的提交。
I tried to run git fsck and it gave me one dangling commit, although I don't see how this would result in the below.
终端输出:
$ git push --set-upstream origin master Enumerating objects: 2824, done. Counting objects: 100% (2824/2824), done. Delta compression using up to 8 threads Compressing objects: 100% (2737/2737), done. error: RPC failed; curl 55 SSL_write() returned SYSCALL, errno = 32 fatal: the remote end hung up unexpectedly | 1.34 MiB/s Writing objects: 100% (2751/2751), 9.48 GiB | 5.86 MiB/s, done. Total 2751 (delta 420), reused 10 (delta 3) fatal: the remote end hung up unexpectedly Everything up-to-date推荐答案
看起来您至少有一个提交包含一个非常大的文件(至少1 GB)。如果您不停地向他们发送数据,GitHub就会挂断电话,您会看到错误。
It looks like you have at least one commit with a single very large (at least 1 GB) file. GitHub will just hang up on you if you keep shoveling data at them like that, and you'll get the error you saw.
GitHub的硬限制为100 MB每个文件和整个存储库100 GB(这些限制以前较小;随着时间的推移,它们一直在增加)。请参见 GitHub的存储库大小限制。
GitHub have a hard limit of 100 MB per file and 100 GB for an overall repository (these limits were previously smaller; over time they have been increasing). See Repository size limits for GitHub.
更多推荐
Github推送失败(curl errno = 32;大型.git目录)
发布评论