Importing project from DevOps to another DevOps

Importing project from DevOps to another DevOps

So I came across with this decision in life that I need to import an existing Git project from an organization's DevOps to my own DevOps.

Being a newbie to Azure DevOps, my initial plan was to of course grab a copy of it from my local machine and then commit the project to the new DevOps. But I was a bit skeptical about the fact that I will not be able to see all the commit history from the old DevOps.

As I search for a solution, I found out that there are actually lots of ways to do it. But maybe due to some permission issues, those steps lead me to nowhere. Luckily, I found this effective solution for my situation.

Here are the steps to do it:

Using your favorite terminal, git clone your source project to your machine's temporary folder storage.

In my case:

git clone --bare https://github.com/contoso/old-contoso-repo.git

1.png

Now, navigate to the cloned project. Mine was:

cd ProjectTobeImport.git

2019-12-27_1836.png

Let's now copy the source to our destination repository:

git push --mirror https://dev.azure.com/jvalenzona/_git/ReactProject

2019-12-27_1841.png

And that's it! My source project was successfully imported. All the source commits history are also intact.

Source: dev.azure.com/tofuthegreat08/_git/ProjectTo..

source.png

Destination: dev.azure.com/jvalenzona/_git/ReactProject

destination.png

Btw, you can also explore other ways of importing that will suit your needs: docs.microsoft.com/en-us/azure/devops/repos..