Introduction
For this topic, I strongly believe that there is no need for an introduction as you already know what Git and Azure DevOps are, and I am guessing that you need to move your codebase or repositories from one of your organizations to another. That is the reason why you are here. I believe that there is no direct way of achieving this, there may be some paid tools that do the tricks, but I didn’t want to pay anything for this small requirement. So let’s just see how I achieved this. Trust me this is not as tough a task as it sounds.
Background
I was working on a project and my customer wanted to move the repositories to their Azure DevOps from ours. So before I do it directly with their DevOps, I wanted to try this out. So I created my own Azure DevOps and moved a sample repository to there from my company Azure DevOps.
Move Repositories to Another Organization’s DevOps
Add a User to Both Organizations
To start doing this process, you should add a user to both projects. I created a sample user ([email protected]) and assigned the contributor access to the two repositories. If you don’t have permission to do so, please contact your project administrator and get it done. Once that is done, you can download all the codes from your Source Organization repository. To do that it is a good idea to use an SSH connection.
Configure SSH Key
To create one generate the RSA key pair by running the ssh-keygen command.

Generate SSH Keys
Update the SSH Key in Source DevOps and Clone the Repository
Now go to your source organization and add the Public Key Data under the SSH public keys section. You can find this public key in the. ssh folder.
Public Key in SSH Folder.png
Let’s add a new SSH key now.

Add a new SSH Key
Now we can get the SSH clone URL and clone our repository.
Clone Repository Using SSH
You should get a result as in the preceding image if everything is correct.

Clone Result
Check out all the Branches and Tags
Now let us just go inside the cloned project and make sure all the branches are available by running git branch -a.





Ghanshyam JaiswalPosted Jul 17, 2020, 8:47 AM
well explained ..
Ghanshyam JaiswalPosted Jul 17, 2020, 8:46 AM
a very good demonstration and clarify information..