I'm currently going through the process of moving a large Git project to Git-LFS, which includes rewriting the entire repo history to make and include certain files within Git-LFS. This part of the process is fine.
However I am having trouble pushing the new repository to an upstream remote (GitHub) as it appears it is too big to push in one go:
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'
I tried using HTTPS with similar results:
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
This appears to be somewhat common and there are some solutions available including specifying chunks of commits to upload at a time. However my repo is a mirror clone and does not work with specified refspecs:
PS > git push -u origin HEAD~5000:refs/heads/master
error: --mirror can't be combined with refspecs
Any ideas on how I can push a mirrored repo to a remote upstream in chunks?