Azure Repository and Branches

Preface – This post is part of the SAP on Azure series.


Azure DevOps pipeline configuration starts with Azure Repository and Branches. We firstly create an Azure DevOps Repo, and then create our branches within it. Then only we can configure Azure Pipelines. In this article we will explore both Azure Repository and Branches.

Azure DevOps Repository

Azure DevOps Repository is a space where all the branches are created. We create separate Repos for individual projects.

Steps to Add Repository

  1. Create a new Repository (You need Authorization to do so)
    New Repository in Azure DevOps
  2. Assign a name to your Repository e.g. “Test Repo”, and choose Type as Git:
    Create a new Repository

You can find your Repo, like mentioned below:

Find Azure DevOps repository

Azure Git Branches

When a new Repository is created, it just has master branch. As per the requirement of your project, you can create multiple branches. A simple flow of code includes three branches i.e. Develop, Release and Production. The Develop is the one where all the development is done, Release is where all the testing is performed by the testers and the Production is the one that has stable code, available for end users.

Adding Branches

According to your use case you can create Develop, Release and Production branch with certain policies (The branch will be on top of Master)

Adding a new Branch in Azure DevOps

Enter required details:

Create a new Branch in Azure DevOps

Add in Favorite:

Mark branch as favourite

Adding Policies in DevOps branches

To add or change branch policies, you need to click on the three dots next to the branch and then click on “Branch policies”.

Adding Policies in DevOps branches

Following are some ideal policies:
1. Require a minimum number of reviewers
minimum number of reviewers in Azure Branch

2. Mark “Check for linked work items” as “Required”

3. Mark “Check for comment resolution” as “Required”

4. Set “Limit merge types” as below:

Limit merge type in Azure DevOps

We can make more changes as per the project requirement. We can read more about policies here.

5. Now add reviewers

add reviewers in Azure Branch

And then add these:

Add new Reviewer policy in Azure DevOps


  • Barry Allen

    A Full Stack Developer with 10+ years of experience in different domain including SAP, Blockchain, AI and Web Development.


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.