Utilities to migrate a Git Repo from Azure DevOps to GitHub.
It will migrate ALL you have in your repository, including all the branches, all the tags and the complete history of commits.
If you want to see an in-depth explanation on how to migrate from Azure DevOps Repos to GitHub, check this video on YouTube:
There are 3 main ways to perform the migration:
- Scripts
- Manually or Automated
- Verbose or Silent
- Check the README for more info
- Docker container
- Use the "official" image on Docker Hub: n3wt0n/azdo2ghrepomigrator, or
- Create your own image
- Check the README for more info
- Azure Container Instances
- Use the scripts i the ACI folder to deploy to Azure ACI
- Check the README for more info
The migrator will perform the migration in 4 steps:
- Make sure you have a local copy of all "old repo", branches and tags
- Create a new folder (with name in the format "AZUREDEVOPSREPONAME-Migration")
- Clone the Azure DevOps repo into it
- Check out all the branches and tags as well
- Add the GitHub repo as a new remote origin
- Push all local branches and tags to the new repo
- Clean up. Remove the Azure DevOps repo and its dependencies from the origins, set the GitHub one as only origin
Both the scripts and the containerized version require a series of prerequisites to work.
You need to know/have:
- The name of the Azure DevOps Organization where your source repository resides (the XXX in dev.azure.com/XXX or XXX.visualstudio.com)
- The name of the Azure DevOps Team Project_ where the source repository resides
- The name of the Azure DevOps Source Repository to migrate (because a single Team Project may contain multiple repositories)
You also need to generate a PAT (Personal Access Token) in Azure DevOps with the following permissions:
- Code
- Read
For instruction on how to generate a PAT in Azure DevOps, take a look at the official documentation here
You need to know/have:
- The GitHub Username or (Organization) with which you have created the destination repository
- The name of the GitHub Destination Repository
Please note that the Destination Repo must be empty and not be initialized.
You also need to generate a PAT (Personal Access Token) in GitHub with the following permissions:
- repo (Full control)
For instruction on how to generate a PAT in GitHub, take a look at the official documentation here