10

In the DevOps UI I created a PR to merge my branch into master. However the UI indicates conflicts. Pull request UI

I want to resolve the conflict by accepting the edited branch. However there does not seem to be anything in the UI to do this.

I looked at this question which mentions that DevOps does not have this functionality. Yet it seems so close that I feel maybe I am just missing something.

[Update]

I went around in circles approving and approving with comment. Finally I noticed the hamburger menu to the right of the complete combo. Hamburger menu

I tried restart merge, but it did not seem to do anything.

Kirsten
  • 15,730
  • 41
  • 179
  • 318
  • 1
    Git merge conflicts have to be resolved locally. – Yehor Androsov Nov 07 '20 at 00:15
  • So it seems. I wish the UI would instruct that! – Kirsten Nov 07 '20 at 00:19
  • I think it actually says it somewhere – Yehor Androsov Nov 07 '20 at 00:31
  • This is probably related to width of your screen, there would be message to resolve conflicts manually if you had wider screen – Yehor Androsov Nov 07 '20 at 00:34
  • Display resolution is 1920 x 1200 landscape. – Kirsten Nov 07 '20 at 00:46
  • I have since resolved locally as advised by Yegor. – Kirsten Nov 07 '20 at 00:47
  • 1
    It wasn't obvious because the answer on your linked question doesn't link it, but it was talking about this [extension](https://marketplace.visualstudio.com/items?itemName=ms-devlabs.conflicts-tab). If you really want to resolve them in the UI you can with that. I still think it is better to do it local and push an update but w/e. – Matt Nov 07 '20 at 01:57
  • Does this answer your question? [Azure DevOps Resolve Pull Request Conflict](https://stackoverflow.com/questions/63473042/azure-devops-resolve-pull-request-conflict) – Matt Nov 07 '20 at 02:01
  • Thanks Matt. I don't want to install an extension in Devops, I guess I will just struggle on in VS in future. – Kirsten Nov 07 '20 at 03:03
  • 1
    @YegorAndrosov can you write your comment as an answer so Kirsten can accept it? – Krzysztof Madej Nov 07 '20 at 23:16
  • @Matt just tested myself and I am seeing Conflict tab without any extension. Probably related to complexity of merge? I have never seen this tab before, maybe I was never looking for it – Yehor Androsov Nov 08 '20 at 05:40
  • 1
    @KrzysztofMadej done, actually there *is* functionality for merge already. Please see my comments and answer – Yehor Androsov Nov 08 '20 at 05:41

2 Answers2

9

It is possible to resolve some merge conflicts on site. Availability of this feature is probably related to how complex differences are. Conflict tab offers multiple options to select or to edit result below.

If you don't have this tab, then your changes have to be resolved locally.

merge tool

Yehor Androsov
  • 4,885
  • 2
  • 23
  • 40
  • I will keep an eye out for the conflicts tab in future – Kirsten Nov 08 '20 at 06:21
  • Ah thanks, I didn't see the Conflicts tab. – Matt Frear Apr 12 '21 at 22:04
  • 4
    The Conflicts tab is not standard. An admin within your organization will need to install an extension, like this official Microsoft [Pull request Merge Conflict Extension](https://marketplace.visualstudio.com/items?itemName=ms-devlabs.conflicts-tab). Installing this provides the Conflict tab for my team, which did not exist before. – msenne Aug 09 '21 at 14:29
  • but how to resolve this locally? I try git fetch git pull on both branches but no merge conflict shows – The Fool Aug 15 '21 at 07:19
  • 2
    @TheFool you need to merge one branch into another to start a process where you resolve conflicts – Yehor Androsov Aug 15 '21 at 12:38
  • Yeah, thank you. I figured it already out. It was real fiddly because my conflicts were in binary files. I ended up deleting the files first all from one branch and then on merge add them back from the new branch. – The Fool Aug 15 '21 at 12:43
  • So if you have to resolve the merge locally, is the next step then to abandon the pull request? – LoJo Jan 20 '22 at 22:30
  • 1
    @LoJo when you push merge commit pull request will be refreshed and it will show that there are no changes between branches anymore and "Close" button will appear. Kinda similar to abandoning – Yehor Androsov Jan 21 '22 at 18:18
  • What exactly does "your changes have to be resolved locally" mean? I ended up abandoning the PR (deleting the remote `feature-branch`), then did a `git checkout develop; git merge --squash feature-branch` locally on my dev machine, resolved the conflict, finished the merge & pushed to develop. – markvgti May 22 '23 at 09:35
7

Just for the record if anyone else finds this post.

At the time of writing DevOps doesn't have any built in tool to resolve a pull request merge conflict.

It has to be done locally.

There are however extensions for this that will display the Conflict tab mentioned in the resolution.

Pull Request Merge Conflict Extension

  • Same thing happened to me. I couldn't find the conflict in Azure DevOps and solved it locally by merging the two branches and then resolved conflicts. – Guy_g23 Jul 17 '23 at 09:19