0
votes

I have a problem very similar to this one but the solutions aren't working.

I am attempting to merge my development branch into my master branch in TFS Azure DevOps with a Pull Request and receive this error -

24 conflicts prevent automatic merging

file1.js ----- Added in both
etc...

Next steps: Manually resolve these conflicts and push new changes to the source branch.

Both development and master have Branch Policies that require changes to be done through a Pull Request.

I have previously merged development to master successfully (and then made more changes in development that I want to get into master), maybe this is why I get this error?

I attempted to merge master to development locally and created a new PR into development for these changes, but the change-set I pushed is empty. Now when I do this:

git checkout development
git pull origin master

I get

From https://MYTFS-SERVER/DefaultCollection/PROJECT/_git/REPO
 * branch            master     -> FETCH_HEAD
Already up to date.

This answer suggests these commands to kick off the merge, but doesn't this just pull the latest from the server into the master branch? I don't get it.

I could attempt to merge master to dev again:

git checkout development
git merge master
// resolve conflicts, commit, push

But I think it will bark about not being a PR, and I swear I already did this when I got the empty change-set, and I don't want to create a bigger mess.

Where should I go from here?

On a side note, I plan on ditching the development branch and just working straight from master once I get this resolved.

3
I was able to get my changes in by reverting my previous dev -> master merge and doing it again, however dev now says 3 behind 15 ahead; it was 2 behind 15 ahead prior to this so I think I would have the same problem next time if I wasn't ditching the development branchuser210757

3 Answers

0
votes

Revert master from previous Pull Request merge

1,From your completed pull request page, find the previous merge from dev to master.

enter image description here

2,In the prompted window, select master branch as target branch to create a revert branch.

enter image description here

3,After you create the revert branch. You will be suggested to create a new Pull Request. Then create a pull request to merge the revert branch to master branch to revert master to its original state. After complete remember to check delete the revert branch in the Post-completion options

enter image description here

4, After the merge was complete. Abandon and then reactivate your original develop-to-master pull request. The confliction error should be gone.

Hope it work for you.

0
votes

I know that this issue was solved but still want to share what worked for me. As complex as the issue sound, all I had to do it running this git command "git pull origin master" into my local branch. This helped me finally find the conflict in my local branch and solve it.

0
votes

I tried

Git Push

Then

Git pull origin master

and the branch was up to date with master