Skip to content

Instantly share code, notes, and snippets.

@4sskick
Forked from mandiwise/Update remote repo
Last active November 17, 2021 08:37
Show Gist options
  • Save 4sskick/9dd5cf3c2988b97fc2e49ff6631ff5d4 to your computer and use it in GitHub Desktop.
Save 4sskick/9dd5cf3c2988b97fc2e49ff6631ff5d4 to your computer and use it in GitHub Desktop.

Revisions

  1. 4sskick renamed this gist Nov 17, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. 4sskick revised this gist Jul 13, 2021. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions Update remote repo
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,12 @@
    // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
    // See also: http://www.paulund.co.uk/change-url-of-git-repository

    $ cd $HOME/Code/repo-directory
    $ cd to old repo folder
    $ git remote rename origin bitbucket
    $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
    $ git remote add origin https://github.com/account/new-repo.git
    $ git push origin master

    $ git remote rm bitbucket
    $ git remote rm bitbucket

    // set latest stream branch to update or pull
    $ git branch --set-upstream-to=origin/master
  3. @mandiwise mandiwise revised this gist Apr 6, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Update remote repo
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
    // See also: http://www.paulund.co.uk/change-url-of-git-repository

    $ cd $HOME/Code/repo-directory
    $ git remote rename origin bitbucket
  4. @mandiwise mandiwise created this gist Mar 7, 2015.
    8 changes: 8 additions & 0 deletions Update remote repo
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/

    $ cd $HOME/Code/repo-directory
    $ git remote rename origin bitbucket
    $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
    $ git push origin master

    $ git remote rm bitbucket