Migrate Azure DevOps Git repos from one organization to another organization with all the histories, tags and pull requests

1.5k Views Asked by At

How do I migrate Azure DevOps Git repos from one organization to another organization with all the histories, tags and pull requests?

I tried multiple options to import all the data like

  1. Azure DevOps import repository

  2. git clone --mirror old repos
    git push to new repos
    
  3. git clone --bare old repos
    git push new repos
    
1

There are 1 best solutions below

5
Daniel Mann On

Repo history is easy.

git clone --bare <old repo uri>
git push --mirror <new repo uri>

Pull requests are impossible. There is no mechanism to export them, and the REST APIs don't give enough options to migrate them with any degree of fidelity.