Quantcast
Channel: Git push existing repo to a new and different remote repo server? - Stack Overflow
Viewing all articles
Browse latest Browse all 20

Answer by mob for Git push existing repo to a new and different remote repo server?

$
0
0

There is a deleted answer on this question that had a useful link: https://help.github.com/articles/duplicating-a-repository

The gist is

0. create the new empty repository (say, on github)1. make a bare clone of the repository in some temporary location2. change to the temporary location3. perform a mirror-push to the new repository4. change to another location and delete the temporary location

OP's example:

On your local machine

$ cd $HOME$ git clone --bare https://git.fedorahosted.org/the/path/to/my_repo.git$ cd my_repo.git$ git push --mirror https://github.com/my_username/my_repo.git$ cd ..$ rm -rf my_repo.git

Viewing all articles
Browse latest Browse all 20

Trending Articles