Skip to content

Instantly share code, notes, and snippets.

@opless
Forked from karan/gist:1f1fe59e4f047f8d888e
Last active August 29, 2015 14:14

Revisions

  1. Karan Goel created this gist Jan 29, 2015.
    16 changes: 16 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    # 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 = [email protected]:username/reponame.git
    url = <remote link for bitbucket>