Azure Dev Ops – Pull Request For Code Merging in Different Branches

Through this blog, just wanted to share a strategy which can be employed in Azure Dev Ops to

  • Segregate code in different branches of development and other environments like production
  • Providing a framework of doing code review before the checked in dev code is merged with production branch.
  • Ability to configure automated deployments on production environment when code is updated in the production branch.

a) At the start, we will have two branches. To implement further security on them, we can configure branch security.

Azure Dev Ops 1

b) When the code is checked  in to build branch, we can create “Pull Requests”. On this step we can specify the related work items and the committed code that was checked in.

Azure Dev Ops 2

As shown in the above screenshot, the approve can refer to the commits, files changed , related work items in the same window.

c) If the reviewer selects merge, the two branches are merged together.

Once changes are merged on the release branch, we can configure build pipeline to deploy the merged code to different environments.

d) If in certain circumstances, two Pull Requests are created simultaneously, the approver, will only be able to merge the branches in the same order pull requests were initiated.

Azure Dev Ops 3

For more information, please refer to the link



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s