I have a Git repository on a internal private network that I would like to move to another internal private network. The two networks are not connected to each other. I created a mirror of the source repository using:
git clone --mirror <URL to my OLD repo location>
I transferred the cloned files to the destination network and they are stored in the ~/project.git directory. On the destination network I have a new repository which is only populated with a README file.
I saw one similar question which recommended this:
git remote set-url origin <URL to my NEW repo location>
git push -f origin
However, the push -f option is blocked per IT policy. I've tried cloning the new repo and running this:
git pull ~/project.git master
But that have me an error due to the unrelated histories and didn't copy the history over. How can I merge the contents of a mirrored Git repo (all of the history for multiple branches) into a new repo? Thanks!