Git Repository Migration from Atlassian Bitbucket server to Azure DevOps.

Sachin Karale
2 min readOct 12, 2021

Now a days, there are so many tools available for Source code management. I have used so many in my 7 years of career in IT. In the beginning year it was github and after that for so many year I used Atlassian Bitbucket and now my company management has decided to use Azure DevOps.

Bitbucket is also excellent but usually SME’s do not use its all features and that’s why they think it’s too expensive and in other hand Azure DevOps emerged in last few years with very flexible billing options and with exactly same CLI as bitbucket/github do use.

Yeah! Azure DevOps having good console and if feels like everything is on same place. I think Atlassian could fix this with there product model in my personal opinion. Anyways I am coming to the point now. We were using bitbucket server which was hosted on AWS, It was having 15 -20 repositories and almost 100’s of commits and 100 branches on each one of them.

What we wanted to migrate on Azure DevOps repo ?
Ans: Everything, Yes we did wanted everything related to respective repositories which includes mainly commit history, branches, tags, etc.

There are so many procedures available for bitbucket to Azure DevOps migration but I do like the simplest one.

If you remember Kung fu Panda movie, there was dialogue “There is no secret ingredient ”. In similar way here no extra configuration is required. Git CLI is enough to get job done and those magical commands are below.

Step 1: Clone the repo with “- -bare” attributes.

Step 2: Check the name of the repository you should be see .git extension in this case.

Step 3: Create new repo on Azure DevOps and copy the clone url, for this case please consider it “abc”. you can create repository with same name.

Step 3: Go inside directory “cd example-repo” and use “- -mirror” attribute.

Step 4: Check branches, commit history , etc on Azure DevOps portal.

Congratulations! You have migrated one repository successfully. You can use same set of commands to do vice-versa(Azure DevOps to Bitbucket)operation.

--

--

Sachin Karale
0 Followers

Tech Enthusiast || AWS Certified || Cloud Solutions Architect at Reactiveworks IT Solutions Pvt. Ltd.