Skip to content

Instantly share code, notes, and snippets.

@GudjonGeir
Last active February 21, 2018 15:10
Show Gist options
  • Save GudjonGeir/c3419bff83abc4f7fd875049b5d14019 to your computer and use it in GitHub Desktop.
Save GudjonGeir/c3419bff83abc4f7fd875049b5d14019 to your computer and use it in GitHub Desktop.
How to import from BitBucket
# Migrate from BitBucket #
Execute the following inside the repository on your computer:
```
git remote set-url origin git@github.com:Sendiradid/Worldclass.git
```

Import the project

  1. Click the plus sign in the navigation bar on GitHub
  2. Click Import Repository
  3. Copy the url for the BitBucket repo
  4. Make sure the owner is Sendiradid
  5. Give the new repo a name and set it to Private
  6. Click Begin import and insert your BitBucket credentials
  7. Go do something else until you get an email notifying that the import has finished
  8. Add instructions in readme for how to set the origin url of local repositories (see ReadmeInstructions.txt)
  9. Make sure that all open PRs in BitBucket are recreated in GitHub
  10. Rename the BitBucket repo, add - MIGRATED to the end of it. This will break all local connections to it.

If you are importing a project with a submodule (innranet)

  1. Follow the above instructions for the submodule
  2. Make sure you have changed the superrepo's origin to GitHub
  3. Inside the superrepo, open .gitmodules and change the url to the new submodule's url
  4. Run git submodule sync
  5. Inside the submodule, run git remote -v to verify changes
  6. Inside the superrepo, commit the changes to .gitmodules to master and push.

Cleanup

Take a few moments and delete stale branches and branches that aren't ahead by any commits

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