Restore a git server repository from a client

On the server side, create an empty git repository:
git init --bare

On the client set the new origin and push everything to the server:
git remote set-url origin newurl
git push origin master
git branch --set-upstream-to=origin/master master

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.