Skip to content

Instantly share code, notes, and snippets.

@jwtea
Last active August 28, 2020 14:45
Show Gist options
  • Save jwtea/bdb682283d642360603c33a51bdae199 to your computer and use it in GitHub Desktop.
Save jwtea/bdb682283d642360603c33a51bdae199 to your computer and use it in GitHub Desktop.
Migrating Bitbucket repository to Github
  • Create new repository on github
  • From your local copy add the new repository as remote upstream git remote add upstream <new repo ssh url>
  • For each branch that needs to be copied (i.e master, develop and any active non merged branches) check out the latest to your local and rungit push upstream <branch name>
  • Push any tags git push --tags upstream
  • Check that everything has been brought across
  • Set the origin url to the new repository git remote set-url origin <new repo ssh url>
  • Delete the upstream remote git remote remove upstream
  • Open in github desktop and all should be gravy
@DaveCelf
Copy link

git remote add upstream instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment