git move my repo code example
Example 1: how to copy data from github server to another server
$ git clone --mirror ssh://[email protected]/git/myorg/myrepo.git
Cloning into bare repository 'myrepo.git'...
remote: Counting objects: 109, done
remote: Finding sources: 100% (109/109)
remote: Total 109 (delta 19), reused 83 (delta 19)
Receiving objects: 100% (109/109), 66.42 KiB | 0 bytes/s, done.
Resolving deltas: 100% (19/19), done.
Checking connectivity... done.
Example 2: clone from one repo to another
First clone the repository you want to work with. This step could be skipped if you want it all to happen in the folder you are already in.
git clone file:///path/to/repo/
Cloning will bring over the remotes specified in that directory. So you'll need to remove the remotes you don't want.
git remote rm <remote>
And add the ones you do, after you have created your remote repository.
git remote add origin <url>