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 HairOfTheDog for Git push existing repo to a new and different remote repo server?

$
0
0

Do you really want to simply push your local repository (with its local branches, etc.) to the new remote or do you really want to mirror the old remote (with all its branches, tags, etc) on the new remote? If the latter here's a great blog on How to properly mirror a git repository.

I strongly encourage you to read the blog for some very important details, but the short version is this:

In a new directory run these commands:

git clone --mirror git@example.com/upstream-repository.gitcd upstream-repository.gitgit push --mirror git@example.com/new-location.git

Viewing all articles
Browse latest Browse all 20

Trending Articles





<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>