Skip to content

Instantly share code, notes, and snippets.

@opless
Forked from karan/gist:1f1fe59e4f047f8d888e
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save opless/55de2cc54cfe69f565b2 to your computer and use it in GitHub Desktop.
Save opless/55de2cc54cfe69f565b2 to your computer and use it in GitHub Desktop.
# rename origin remote
git remote rename origin github
# add the gitlab remote (for the love of everything that’s holy, use ssh)
git remote add bitbucket <remote link for bitbucket>
# push existing code to new remote
git push -u bitbucket —all
# let’s magic
git config -e
# add this in the file
[remote “origin”]
url = git@github.com:username/reponame.git
url = <remote link for bitbucket>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment