【发布时间】:2017-03-31 20:57:26
【问题描述】:
我目前正在经历将一个大型 Git 项目迁移到 Git-LFS 的过程,其中包括重写整个 repo 历史以在 Git-LFS 中创建和包含某些文件。这部分流程没问题。
但是,我无法将新存储库推送到上游远程 (GitHub),因为它看起来太大而无法一次性推送:
PS > git push
Counting objects: 337130, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (73730/73730), done.
remote: fatal: pack exceeds maximum allowed size
fatal: sha1 file '<stdout>' write error: Broken pipe30 MiB/s
error: failed to push some refs to 'git@github.com:my-repo.git'
我尝试使用 HTTPS,结果相似:
PS > git push
Counting objects: 337130, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (73730/73730), done.
error: RPC failed; curl 55 SSL_write() returned SYSCALL, errno = 10053
fatal: The remote end hung up unexpectedly
Writing objects: 100% (337130/337130), 3.58 GiB | 388.62 MiB/s, done.
Total 337130 (delta 261838), reused 337130 (delta 261838)
fatal: The remote end hung up unexpectedly
Everything up-to-date
这似乎有点常见,there are some solutions available 包括指定一次上传的提交块。但是我的 repo 是一个镜像克隆,不适用于指定的 refspec:
PS > git push -u origin HEAD~5000:refs/heads/master
error: --mirror can't be combined with refspecs
关于如何将镜像存储库分块推送到远程上游的任何想法?
【问题讨论】: