Azure DevOps Pull Request Merge Conflicts: 7 Easy Fixes (Resolve in Browser & Online)

|

Struggling with Azure DevOps pull request merge conflicts? Learn how to resolve “edited in both” issues, fix conflicts preventing automatic merging, and handle merge conflicts directly in the browser or online. This step-by-step guide covers Azure DevOps merge conflict extensions, practical fixes, and proven workflows to resolve conflicts fast.

This guide covers every method to resolve merge conflicts in Azure DevOps pull requests — from the command line and Visual Studio all the way to the browser-based online editor — with real code examples, step-by-step instructions, and team best practices.

Azure DevOps
Git
~14 min read

Quick answer

In Azure DevOps, go to your Pull Request → click Resolve conflicts → use the inline web editor or merge locally with git merge → commit and push. The merge button re-enables automatically once all conflicts are cleared.

What Are Merge Conflicts in Azure DevOps Pull Requests?

A merge conflict occurs when two branches modify the same region of a file and Git cannot determine which version to keep. Azure DevOps surfaces conflicts at the pull request level — blocking the automatic merge until a developer manually resolves each conflict.

Why merge conflicts happen

Git is brilliant at merging changes automatically, but it draws a hard line when two people edit the same lines. Conflicts arise from:

  • Two developers editing the same lines of a file on different branches.
  • One branch deleting a file while another modifies it.
  • One branch renaming or moving a file while another edits its content.
  • Long-lived feature branches that have diverged significantly from main.
  • Rebasing or cherry-picking commits that rewrite history.

Common scenarios: “edited in both” and “deleted vs modified”

Edited in both branches

Developer A changes line 42 in config.js; Developer B also changes line 42 on their branch. Git can’t auto-pick.

Deleted vs. modified

Branch A deletes legacy.js; Branch B adds a new function to it. Git raises a conflict — should the file exist?

Renamed vs. edited

Branch A renames utils.ts to helpers.ts; Branch B edits utils.ts. Git doesn’t know which path wins.

Overlapping refactors

Two separate refactors touch the same functions or imports, creating overlapping changes that Git cannot reconcile automatically.

How Azure DevOps detects conflicts

When you open a pull request, Azure DevOps runs a merge simulation in the background using the same three-way merge algorithm as Git. It compares the common ancestor commit, the source branch HEAD, and the target branch HEAD. If Git cannot auto-merge any file, the PR is flagged and the merge button is disabled.

What you see in the Azure DevOps UI

A red “This branch has conflicts that must be resolved” banner appears at the top of the pull request, along with a list of affected files. The Complete merge button is grayed out until every conflict is resolved and committed.

Azure DevOps Conflicts Prevent Automatic Merging – Why It Happens

One of the most common questions developers search for is why Azure DevOps conflicts prevent automatic merging. The answer is fundamental to how Git works — but the UI error messages can make it confusing.

C:\Serge\Site\articles\2026\Git merge conflicts\azure devops conflicts prevent automatic merging.jpg

Understanding automatic merge failure

Git’s automatic merge only succeeds when changes are non-overlapping. If Developer A edits lines 10–15 of a file and Developer B edits lines 40–50 of the same file on a different branch, Git merges both sets of changes without complaint. The moment two changes touch the same lines or adjacent lines, Git inserts conflict markers and stops.

Azure DevOps inherits this behaviour and enforces it at the PR level, meaning: no merge until every marker is resolved.

Typical error messages explained

This branch has conflicts that must be resolved before merging.
Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (content): Merge conflict in src/app/config.ts
Error phraseWhere it appearsRoot cause
conflicts prevent automatic mergingAzure DevOps PR bannerOverlapping edits on same lines
Automatic merge failedTerminal / git outputGit merge algorithm cannot reconcile
CONFLICT (content)Terminal after git mergeBoth branches changed same file region
CONFLICT (modify/delete)Terminal after git mergeOne branch deleted, other modified
Merge button disabled (grayed out)Azure DevOps PR UIUnresolved conflict markers remain

When auto-merge is not possible

Auto-merge will never succeed when:

  • The same lines have different content on both branches.
  • A file was deleted on one branch and modified on another.
  • A submodule pointer was updated differently on both branches.
  • A binary file (image, PDF) was modified on both branches — Git has no text diff to apply.

Azure DevOps Pull Request Merge Conflict “Edited in Both” Explained

The label “Edited in both” is exactly what Azure DevOps shows next to a file in the conflict resolution panel. It means both the source branch and the target branch have changed that file, and Git has flagged at least one overlapping region.

What “edited in both” really means

When you see “Edited in both” it does not mean the entire file conflicts — it means at least one hunk (a contiguous block of changed lines) overlaps. Azure DevOps will show you only those specific regions inside the file editor, with conflict markers surrounding them.

Real example of conflicting changes

Suppose both branches changed the getTimeout() function in config.ts:

config.ts — conflict markers inserted by Git
// Git inserts conflict markers around the conflicting hunk

<<<<<<< HEAD (target branch: main)
export function getTimeout(): number {
  return 5000; // 5 seconds  updated by Alice
}
======= 
export function getTimeout(): number {
  return 8000; // 8 seconds  updated by Bob
}
>>>>>>> feature/bob-perf-tuning (source branch)

// Lines above and below the hunk merge cleanly  no marker needed there

Critical

Never commit a file that still contains <<<<<<<, =======, or >>>>>>> markers. These will cause build and runtime failures. Always verify all markers are removed before committing.

How to decide which code to keep

Choosing the “winner” isn’t arbitrary — use these decision rules:

  1. Talk to the other developer. In most team environments, a quick message beats guessing.
  2. Check commit messages and PR descriptions for the intent of each change.
  3. Keep the most recent business requirement. If Alice’s 5-second timeout was a hotfix for production, keep it.
  4. Combine both changes when they serve different purposes — e.g., keep the new value but add a comment explaining why.
  5. Run the tests. After resolving, ensure the test suite passes before marking complete.

How to Resolve Merge Conflicts in Azure DevOps (Step-by-Step)

There are two primary paths to resolve merge conflicts in an Azure DevOps pull request: locally using Git (recommended for complex conflicts), or directly in the browser (fast for simple changes). This section covers the local approach.

Using Visual Studio / local Git

The local workflow gives you the full power of your IDE, your preferred merge tool, and your test suite. It is the recommended method for any conflict beyond a trivial one-line change.

Fetch the latest changes

Make sure both branches are up-to-date locally before you start.

Check out your source (feature) branch

Switch to the branch you’re merging from — the branch your PR is for.

Merge the target branch into your source branch

Pull the latest target (e.g., main) into your feature branch to surface conflicts locally.

Edit each conflicting file

Open the flagged files, remove conflict markers, and write the resolved version.

Stage the resolved files

Use git add to mark each conflict as resolved.

Commit the merge and push

Commit with a clear message, then push to the remote. Azure DevOps auto-refreshes your PR.
Bash — full local resolution workflow
# Step 1 – fetch all remote branches
git fetch --all

# Step 2 – switch to your feature branch
git checkout feature/bob-perf-tuning

# Step 3 – merge the target branch into your branch
git merge origin/main
# OUTPUT: CONFLICT (content): Merge conflict in src/config.ts
# OUTPUT: Automatic merge failed; fix conflicts and then commit the result.

# Step 4 – see which files need attention
git status
# both modified: src/config.ts

# (edit src/config.ts in your editor, remove all <<<, ===, >>> markers)

# Step 5 – stage the resolved file
git add src/config.ts

# Step 6 – commit and push
git commit -m "fix: resolve merge conflict in config.ts — keep 8s timeout"
git push origin feature/bob-perf-tuning

Resolving conflicts manually in code

After running git merge, open each conflicting file and decide what the final code should look like. The goal is to produce clean, correct code — not simply to delete one side’s changes wholesale.

config.ts — before resolution (conflict markers present)
<<<<<<< HEAD
  return 5000;

=======
  return 8000;

>>>>>>> feature/bob-perf-tuning
config.ts — after resolution (clean, no markers)
export function getTimeout(): number {
  return 8000; // Agreed with Alice — 8s required for new API response times

}

Marking conflicts as resolved and committing

Once you’ve edited all files, git status should show no remaining “both modified” entries. Stage every resolved file with git add <file>, then commit. The commit message should briefly explain the resolution decision so your team has an audit trail.

Pro tip

Use git diff --check before committing to automatically detect any leftover conflict markers in staged files. It exits non-zero if any markers remain — great to add to your pre-commit hook.

Resolve Merge Conflicts in Azure DevOps Browser (Online Method)

For straightforward conflicts, you can resolve merge conflicts in the Azure DevOps browser without cloning or installing anything. This is the fastest path for small conflicts — especially useful for documentation edits, config value changes, or when working on a machine without a local repo.

How to use the web editor

Open the Pull Request in Azure DevOps

Navigate to Repos → Pull requests and click the conflicting PR.

Click “Resolve conflicts”

The PR overview page shows a banner: “This branch has conflicts.” Click Resolve conflicts to open the online editor.

Select a conflicting file

The left panel lists all conflicting files. Click each one to load its diff view.

Use “Accept current”, “Accept incoming”, or edit manually

Azure DevOps gives you one-click options for each conflict hunk, or you can type directly in the editor pane.

Click “Accept merge” for each file

After resolving all hunks in a file, click Accept merge. Repeat for every conflicting file.

Commit the merge commit

Click Commit merge at the top. Azure DevOps creates a merge commit on your source branch and re-evaluates the PR — the merge button re-enables.

Editing conflicting files directly in browser

The browser editor shows a three-panel view: the source branch content on the left, the target branch content on the right, and the editable result pane at the bottom. You can click individual conflict hunks to accept one side, or type directly in the result pane to write a custom resolution.

Browser method scenario: Changing a version number in package.json

Your feature branch bumped the lodash version to 4.17.21; main bumped it to 4.17.20. This is a perfect browser-resolution case: click the incoming change (4.17.21), click Accept merge, commit. Done in under 60 seconds — no local clone needed. This is what azure devops resolve merge conflicts in browser is designed for.

Pros and limitations of browser-based resolution

AspectBrowser (Online)Local Git / IDE
Speed for simple conflictsFastSlower setup
Run tests before committingNot possibleYes
Complex multi-file conflictsDifficultRecommended
Binary file conflictsNot supportedPossible
Works without local installYesNo
Syntax highlightingBasicFull IDE support

Azure DevOps Merge Conflict Extension – Do You Need It?

Azure DevOps has a rich extension marketplace. Several extensions and external tools enhance the conflict resolution workflow, though many teams find the built-in tooling sufficient.

Popular extensions and tools overview

Tool / ExtensionTypeBest for
VS Code GitLensIDE extensionRich inline blame, conflict history, side-by-side diffs
Visual Studio Merge EditorIDE built-inThree-way merge with .NET / C# project files
P4MergeStandalone toolLarge binary/text files, visual 4-pane diff
IntelliJ / Rider Merge ToolIDE built-inJVM / .NET projects with smart AST-aware merging
Azure DevOps PR InsightsMarketplace extensionPR analytics, conflict trend reporting
Semantic MergeStandalone toolLanguage-aware merging — understands code structure

When extensions help vs. when they’re not needed

Extensions are genuinely useful when you have frequent, complex conflicts across many files — for example, a mono-repo with deeply nested imports, or C# project files (.csproj) that tend to conflict on package references. For smaller teams with good branching discipline, the built-in Azure DevOps web editor and VS Code are more than enough.

Configure a custom merge tool

You can tell Git to open any external merge tool automatically. Add to your ~/.gitconfig: [merge] tool = vscode and [mergetool "vscode"] cmd = code --wait $MERGED. Then run git mergetool to step through each conflict.

Recommended setup for teams

  • Small teams (1–5 devs): Built-in Azure DevOps web editor + VS Code with GitLens. No additional extensions needed.
  • Mid-size teams (5–20 devs): Enforce a team-wide merge tool (VS Code or IDE built-in) via a shared .gitconfig. Add branch policies to require up-to-date branches before PR completion.
  • Large teams / mono-repos: Invest in Semantic Merge or a custom merge driver for frequently-conflicting file types (e.g., lock files, auto-generated code).

Best Practices to Avoid Merge Conflicts in Azure DevOps

The best merge conflict is the one that never happens. These practices dramatically reduce conflict frequency on any Azure DevOps project.

Keep branches up to date

The longer a branch lives without pulling from main, the larger the divergence — and the more conflicts you’ll face. Establish a team norm: pull (or rebase) from main at least once per day on active feature branches.

Bash — daily sync routine
# Option A – merge main into your branch (preserves history)
git fetch origin
git merge origin/main

# Option B – rebase onto main (linear, cleaner history)
git fetch origin
git rebase origin/main

# Azure DevOps branch policy: require branches to be up to date before merge
# Settings → Repos → Branches → Branch policies → "Require a minimum number of reviewers"
# + "Require branches to be up to date before merging" ✓

Use smaller pull requests

Large PRs are conflict magnets. Every day a 2,000-line PR sits open, other developers are shipping code that might touch the same files. Aim for PRs under 400 lines of changed code where possible. Techniques to keep PRs small:

  • Use feature flags to ship incomplete features safely to main.
  • Split large features into a chain of stacked PRs, each building on the last.
  • Separate refactoring commits from feature commits — submit the refactor first.
  • Open draft PRs early to signal work-in-progress and coordinate with teammates.

Team collaboration strategies

Communicate file ownership

Use Azure DevOps CODEOWNERS to route PRs to the right reviewers and signal who owns which files, reducing unknowing overlap.

Branch naming conventions

Clear prefixes like feat/fix/refactor/ make it easy to spot potentially overlapping work before it starts.

Enforce branch policies

Set Azure DevOps branch policies to require branches to be up to date before any PR can merge. This forces developers to sync often.

Pair on risky refactors

When a large refactor touches many files, pair with any developers working nearby to coordinate who changes what, preventing parallel edits.

Troubleshooting: Common Azure DevOps Merge Conflict Issues

Conflict still appears after resolving

PR still shows "conflicts" even after you committed the fix

Cause: The push didn’t include the merge commit, or you resolved on the wrong branch. Fix: Run git log --oneline -5 and confirm the merge commit is there. Then verify git push origin <your-branch> completed without error. If Azure DevOps still shows conflicts, click Resolve conflicts again — it will show “All conflicts resolved” once the push is detected.
bash — diagnostic commands
# Confirm you're on the right branch
git branch --show-current

# Confirm merge commit exists
git log --oneline -5

# Check for remaining conflict markers in staged files
git diff --check

# Verify remote is up to date
git log origin/feature/your-branch --oneline -3

Pull request not updating

If the PR conflict banner persists despite a successful push, try these steps:

  1. Hard refresh the Azure DevOps PR page (Ctrl+Shift+R / Cmd+Shift+R).
  2. Scroll to the Files tab — if the new commit appears there, the PR has updated but the UI may be cached.
  3. Check the Commits tab to confirm your latest push is listed.
  4. If the PR uses auto-complete, re-enable it after pushing — resolving a conflict disables auto-complete as a safety measure.

Merge button disabled

The merge button in Azure DevOps stays disabled for several reasons beyond just unresolved conflicts:

ReasonHow to fix
Unresolved conflict markers remainRemove all <<< markers, stage, commit, push
Required reviewers haven’t approvedRequest review from the required approvers set in branch policy
Required build / CI pipeline failingFix failing tests or pipeline steps, let CI re-run and pass
Branch is not up to date with targetMerge or rebase from target branch, push again
Work items not linked (policy enforced)Link the required work item(s) to the PR
Comment threads not resolvedResolve all open review comments or mark them “Won’t fix”

Branch policy override

Azure DevOps administrators can bypass branch policies using Override (the “Complete merge” dropdown). Use this only in genuine emergencies and document why in the PR comments — policy overrides bypass required reviewers and CI checks.

Conclusion: Fastest Way to Resolve Azure DevOps Merge Conflicts

Quick recap

Merge conflicts in Azure DevOps pull requests are unavoidable in active codebases — but they’re always fixable. Here are the 7 fixes covered in this guide:

  1. Understand the conflict type (edited in both, delete/modify, rename/edit).
  2. Read the error message carefully to pinpoint the root cause.
  3. Resolve locally using git merge + your IDE for complex conflicts.
  4. Resolve in browser using the Azure DevOps online editor for simple conflicts.
  5. Use a merge tool (GitLens, P4Merge, Semantic Merge) for difficult cases.
  6. Apply branch policies to prevent future conflicts (up-to-date requirement).
  7. Keep PRs small and branches fresh to minimize conflict surface area.

Recommended workflow

Fetch + checkout your branch
git fetch --allgit checkout feature/your-branch
Merge target branch locally
git merge origin/main — surfaces all conflicts at once
Resolve each file
Remove all <<< / === / >>> markers, write the correct code
Verify with tests
Run your test suite — don’t skip this, conflicts introduce subtle bugs
Stage, commit, push
git add .git commitgit push origin feature/your-branch
Return to Azure DevOps
PR auto-refreshes — the merge button re-enables once conflicts clear

Key takeaway

For simple one-line conflicts, use the Azure DevOps browser editor — it’s the fastest path requiring zero local setup. For anything involving logic decisions, multiple files, or code that needs testing: resolve locally using your IDE so you can verify the result before pushing.

You might also find it helpful to read Best Branching Git Workflow to Follow: 7 Proven Strategies for Clean Code to learn how a solid branching strategy can prevent merge conflicts before they even happen.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x