Importing a GitHub Repo to Azure DevOps Repo

Microsoft recently re-branded Virtual Studio Team Services into Azure DevOps. With it came a face-lift and some great new features. I have been using GitHub for my zPlanner project, and recently thought it would be cool to take advantage of the CI/CD tools available with Azure DevOps. So this article is a quick how-to on cloning your GitHub repo into Azure DevOps.

Creating a Project

A project is a management structure that combines a repository with other functionality that you use when working with code. For example, an Azure DevOps project includes things such as build pipelines, boards (features, bugs, user stories, etc), test plans, and more!

Create a new project by clicking the button in the top right corner.

So the first thing we need to do is create a project. To do that log in to Azure DevOps and click “Create Project” in the top right corner.

Next fill in the new project card with the proper information. Make sure to click Advanced if you want to change the version control system, or the work process, for this project.

The New Project Card. Enter the relevant information to create a new Azure DevOps Project.

Once your project has been created you will be taken to the project summary page. Here you can see project members, the readme, and some stats about your repos (but you don’t have one yet… so now let’s import from GitHub).

Importing your GitHub repo

Now that we have a project we can navigate to the repo’s section of our project and import our existing GitHub repo.

Initial Repo page with no files.

On this screen we can click on the Import button about half way down the page. That will trigger a popup that asks where the source repo is located. From here you should select “git” as the source type, and paste in your clone URL from GitHub. If it’s a private GitHub repo you will need to check the authorization box ad enter your credentials.

Import Popup – Enter your source type and your clone URL

Click Import to start the process. Depending on your project size it can take a couple of minutes. 

Import in progress, if you don’t want to wait, you will also receive an email when it is complete.

My project is small, so by the time you read that and scrolled down, it was already imported.

Import completed, and it only took a minute or so.

After being redirected it looked as though all my files were still there.

A perfect clone!

I also thought, hmm I wonder if it also brings along all the revision information… Sure enoughlog in it does that too!

Revision information is also imported from GitHub

All Done!

That was pretty easy! I can’t wait to see how I can leverage pipelines and the boards feature to bring my zPlanner project along. I can’t remember if I have blogged about it before or not, but I also have a zPlanner container, so I may try to create a build pipeline that updates that container when new pull requests are merged! 

Thanks for reading!

Loading

Share This Post

Post Comment