Dave Rendón Microsoft Azure MVP, embracing and fostering tech intensity to benefit society and thrive in a digital world.

Setup your Github repository on Azure Devops

1 min read

Setup your Github repository on Azure Devops

On this article I will show you step-by-step how to setup your Github repository on Azure Devops.

Pre-requisites:

Preparing the source code

1. Go to your github repository and click on Clone or download, then click on Download ZIP and save the zip to your local machine

2. Unzip and extract the files on your local machine

3. Bring up a command line window and change directory into the workshop folder “Your-Repo”-master that contains the code.

Note: There will be two levels of folders with the same name (“Your-Repo”-master), be sure to navigate to the folder that has the code below

4. On the command line, execute a series of git commands to initialize the directory as a version control project and prepare it to use with Azure DevOps

git init       <to initialize the directory for version control>
git status     <to check the current status of the directory>
git add .      <will add all the files into the staging area>
git commit -m  “Initial Build”     <creates a commit>

5. On Windows, the directory will now resemble the following and is ready to be pushed to Azure DevOps – WILL PUSH IT TO AZURE DEVOPS IN THE NEXT STEPS

Create a new project in your Azure DevOps account

1.Navigate to http://devops.azure.com

2. If you have multiple organizations, select the one you will be using to host this project.  Also, you could create a new organization and create your project in the new organization.

3. Create a project and name it, optionally you can set your project to private or public

The project is available when a welcome screen appears similar to the below image

Publish your Repo to Azure DevOps

Navigate to the Repos icon on the left pane:

Copy the git commands under the section push an existing repository from command line

Now navigate to the directory where you extracted and prepared the repo and issue the 2 commands you copied from the DevOps Repos page as shown in the image below

Once you push your local repo to Azure DevOps you should see it like below:

On the next article I will show you how to create an Azure DevOps pipeline to provision the Azure resources.

Dave Rendón Microsoft Azure MVP, embracing and fostering tech intensity to benefit society and thrive in a digital world.

Leave a Reply

Your email address will not be published. Required fields are marked *