This post was most recently updated on March 13th, 2023.< 1 min read.
A while ago, I needed to move an Azure DevOps Git repository from one organization to another. And that was far easier than I thought. For once, a nice surprise from Git _and_ Azure DevOps 😀 So, let me tell you how that’s done!
Well, how it’s done if it goes well, anyway. And if still works as it used to when you’re reading this. We’ll see!
Time needed: 5 minutes
How to move an Azure DevOps repository from one organization or team project to another?
- Navigate to the source repo
First, find the Azure DevOps team project that currently hosts the git repositories, and select the repository you want to move.
- Grab the URL to clone the repository
Copy the clone URL to the clipboard and save it somewhere. You’ll need it momentarily!
- Generate your git credentials
Copy the credentials (user name and password) to the clipboard and save them somewhere. You’ll need them momentarily!
- Start the repo import wizard
Select “import repository” from the dropdown list of your repositories.
- Enter the required details for the import
Paste the Clone URL you stored earlier.
Select “Requires Authentication” as your git repo on Azure DevOps probably does require authentication. And then paste the credentials you stored earlier!
The name of the repository should be automatically populated from the URL you supplied, but you can also change it.
- You should be good!
Boom! Yeah, it should’ve been that easy.
Was it successful? Did the import fail miserably? Let me know in the comments section.
- Microsoft’s documentation: https://docs.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?view=azure-devops
- And a confusingly overlapping piece of extra documentation: https://learn.microsoft.com/en-us/azure/devops/repos/git/move-git-repos-between-team-projects?view=azure-devops
- How to manually install Windows updates? - November 28, 2023
- How to restore an old version of a Trello card? - November 21, 2023
- How to fix winget when it’s throwing a “0x8a15000f : Data required by the source is missing”? - November 14, 2023