DEV Community

Nishanth Gunupudi
Nishanth Gunupudi

Posted on

Easily migrate your repositories from Bitbucket to Github with all branches and commits!

The standout reason to use Bitbucket was its ease to create a private repository, where we had to buy a GitHub subscription to do it - but as GitHub also provides this, it's time to move our base back to our favorite version control.

Alt Text

Steps to migrate your repositories

Step 1: Create a GitHub repository

Create a new private repository on Github. Don’t fail to create an empty repository, e.g. uncheck the option Initialise this repository with a README while creating.

Step 2: Clone Bitbucket project

Clone the existing project you wish to migrate. Don't forget to change the visibility to 'public' in case it is a private repository.
You can do it by navigating to Repository settings/repository details
Alt Text
and uncheck 'This is a private repository'`.
Alt Text

Step 3: Import your repository

Once you are back to your newly created GitHub repository, navigate to Quick setup in the <>Code tab

Alt Text

and scroll down to locate …or import code from another repository

Alt Text

paste your HTTPS-URL and click Begin import

Alt Text

Step 4: Delete your old repository

If all contents are migrated to your GitHub repository, double-check it, and after that delete the Bitbucket repository if not required.
1. Go to the old Bitbucket repository
2. Select menu option Setting > Delete repository

That's it, your repository is set up with GitHub!

Top comments (0)