Migrating a repo from Bitbucket to Azure DevOps
RSS feed
Date: May 07, 2019
Tags: azure
Share: Share on Twitter
NOTE: Technology changes fast, so some of the images and/or code in this article maybe be out of date. Feel free to leave a comment if you notice something that needs updating.
When a developer decides to use the cloud, a whole world of opportunities open up to them. From hosting to data to AI, there’s nearly limitless computing available to empower users to build amazing solutions. And, like any dev worth his weight in Valyrian steel, they implement automated testing and source control into every project. Popular repositories like GitHub and Bitbucket provide great low-cost solutions for securing your code and helping you automate your deployments. But what if you want to transition from one of these services to Azure DevOps? In this article, I’ll show you how.

Why Azure DevOps?

Before we get into the steps to migrate, I want to let you know why I chose Azure DevOps. To be honest, I really don’t think it matters what service you use, as long as you use SOMETHING. Most online repos accomplish the same basic things: allow you to store code, collaborate with others, and make your code universally accessible to other systems. For me, Azure DevOps brought some unique capabilities I wanted to take of advantage of. Here’s what Azure DevOps provides:




Learn more about Azure DevOps 

How to migrate from Bitbucket to DevOps?

The process of migrating from Bitbucket to Azure DevOps starts with creating your Azure DevOps account. After you sign up for DevOps and create your organization, click the + Create project link and enter your project details.



After the project is created, you will want to import your Bitbucket repository. In Bitbucket, click the Clone link in your repository.




In the Clone this repository modal, copy the URL for the repo. Note that the text also contains Git commands. This would be used if you were cloning the repository using Command Line or other utility. In this tutorial, we only need the URL.



With the URL copied, jump back to DevOps and navigate to Repos/Files. Scroll down and click the Import link to import the repository.



Enter the Clone URL and your username/password (assuming your Bitbucket repo is private).




You will see the following screen as the repository is imported. This may take a few minutes, depending on the size/history of your repository.



Once completed, you will see your Repo files displayed.




What’s extra awesome is the migration not only brings the files, but all branches in your repository. This means you will see a full record of all commits and branches within your code. 



Open with Visual Studio

Once your repository is migrated, you can open the project in Visual Studio. With VS 2019, you can do this from the start screen and save yourself some clicks. Select the Clone or check out code option.




Click Browse a repository/Azure DevOps and select your new DevOps project. You may need to sign in and browse down to your project.




Once loaded, you’ll see your code in the Solution Explorer in the IDE. You're now ready to start coding away and using Azure DevOps for your project.




Wrapping up

Migrating from Bitbucket to Azure DevOps is a quick and easy process. Once your code is in DevOps, you’ll have access to all the powerful services Azure has to offer. Give it a shot and you'll be amazed at how much you can automate your processes and simplify your development.  Good luck!