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
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4sskick/9dd5cf3c2988b97fc2e49ff6631ff5d4 to your computer and use it in GitHub Desktop.
Save 4sskick/9dd5cf3c2988b97fc2e49ff6631ff5d4 to your computer and use it in GitHub Desktop.
Transfer repo from Bitbucket to Github
// 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 to old repo folder
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/account/new-repo.git
$ git push origin master
$ git remote rm bitbucket
// set latest stream branch to update or pull
$ git branch --set-upstream-to=origin/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment