Resolve Merge Conflicts using “Pull Request Merge Conflicts” Microsoft DevOps Extension

While there are different ways and tools to handle the issue, in this post we will use a Microsoft standard extensions for DevOps to resolve merge conflicts within Azure DevOps. The extension is called “Azure DevOps Pull Request Merge Conflicts” and is available in the marketplace (free).

The problem of the conflicts in the merge can reveal itself during pull requests to merge branches, or application rebases, or automated deployment activities. If there are conflicts, DevOps does not allow you to publish the project until they are resolved (sure!); the automatic merge identifies only the criticalities but does not allow to edit the differences in a visual way.

This simple tool is a visual tool, it can be convenient to use because it allows you to manage the single merge conflict; you can perform manual merge directly from DevOps.

Pull Request Merge Conflicts extension – “How to” install

In DevOps open “Organizational settings”, go to “Estensions” 🡪 after search in Marketplace.

Search For “Pull Request Merge”

Select your DevOps Organization

How-to use Conflict tab

After installation, you may notice a new tab where you can view the detected merge problems

Pull Request 🡪 conflicts are visible in conflicts tab

From “Conflicts tab” you can view and solve merge problems.

You can use this tool like other products (winmerge etc.) and you can select auto-merge, mantain left of right code, discard all changes etc. for each object.

Fix merge issues and accept pull request

Once the problems have been fixed, it is possible to accept the pull request and proceed with the merge in the target branch.

Pull Request 🡪 Completed (green)

In DevOps – REPO

In VSCode

if you used auto.merge from the tool, you can see the sections inserted in the files.

Microsoft Search Extension

Code Search is another interesting Microsoft extension to use for code searches.

Leave a Reply

Your email address will not be published.

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