Skip to content
Discussion options

You must be logged in to vote

GitHub Repo Copy Problem & Fix

What is the Problem?

You want to copy an old GitHub repo into a brand new repo (not as a fork).
You followed the official guide:
git clone --bare OLD-REPO then git push --mirror NEW-REPO

But you get this error:

error: RPC failed; curl 18 Transferred a partial file
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly

Your repo is big (~350 MB with 326k objects). Even after setting `http.postBuffer 2147483648` the push still fails.

Simple Solution (Works Most Times)

Step 1: Make New Empty Repo on GitHub

  • Create NEW-REPO (keep it empty — no README).

Step 2: Run These Commands

# Clone as mirror
git clone --m…

Replies: 6 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@edgarbc
Comment options

Answer selected by edgarbc
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Repositories The core of version-controlled code storage Question Ask and answer questions about GitHub features and usage Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community!
6 participants