26

I have followed the instructions on command line: https://docs.microsoft.com/en-us/azure/devops/repos/git/merging?view=azure-devops&tabs=visual-studio

enter image description here

all I want to do is resolve this merge conflict its complaining about.

To be clear, I have done a git pull, it says Already up to date.

I also tried:

git pull origin feature/ENGA-2514
From ssh.dev.azure.com:v3/nfib/NfibEnterprise/engage.mobile
 * branch                feature/ENGA-2514 -> FETCH_HEAD
Already up to date.

I have also tried:

git log --merge
fatal: --merge without MERGE_HEAD?

Where is this elusive merge conflict?

Daniel
  • 539
  • 2
  • 5
  • 13
  • I found it impossible to do this on the web UI, I had to do it in Visual Studio instead. As far as I could tell there were zero options in the web UI for resolving conflicts. – SendETHToThisAddress Mar 05 '21 at 00:27

5 Answers5

14

Try this solution: Pull Request Merge Conflict Extension. It helps to resolve conflicts inside the pull request page.

7

I had this problem too, coming from github where you can usually resolve text file changes in browser.

On your local repo, you want to get the latest then reverse-merge, so in your case

// Precursor to ensure your local is the same as origin
git pull master
git checkout feature/ENGA-2514
git pull feature/ENGA-2514

// include all of the other branches changes into yours. git merge master

// This is where you'll be able to resolve the conflicts locally // and commit the merge into feature/ENGA-2514

git push feature/ENGA-2514

Then your branch wont conflict with master in devops, since youve just merged master into your branch.

Jono
  • 171
  • 1
  • 2
  • 1
    hey @Jono, we tend to do the same, but once we do, we get a warning on that pull request "Multiple merge base detected. The list of commits displayed might be incomplete." I wondering if you get the same message? Interestingly, if we do the rebase and then force push, this warning doesn't come up. But I always thought merge is normally preferred over rebase? – andkorsh Oct 27 '21 at 14:48
  • Won't this merge master into feature/ENGA-2514? What if I don't want to merge all of master's commits into feature/ENGA-2514? – somethingRandom Jul 22 '22 at 12:40
4

I am not sure this tab appears 100% of the time, you still have to merge some cases locally, but you can merge some PRs without any extensions in latest UI update.

merge tool

  • It seems this extension does not have checkboxes to pick left or right side on specific conflicts, so you have to manually correct them in the bottom pane. Or pick the entire left/right side. – Brain2000 Feb 25 '21 at 17:52
  • 1
    It definitely doesn't show all the time. I have a conflict right now in a project merge attempt that doesn't present that tab for "conflicts" – David Saintloth Apr 22 '22 at 17:12
0

For me, I cannot resolve these conflicts.

To PREVENT THEM:

  i) Make backups outside the folder system for the repository

ii) Totally delete your 'local' folder for the repository. (Seems counterintuitive, but it is all that works for me).

iii) Re-load 'local' folder from the web-repository.

iv) Eventually, check-in, then it will work.

v) Repeat step i for next time.

JosephDoggie
  • 101
  • 2
0

Pull/Check out the branch with these merge conflicts. Edit the file with reported merge conflicts locally. Push the changes and it will be resolved.

Justas
  • 1
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. – Community Jan 05 '22 at 13:01