VS Team Explorer merge conflicts

Viewed 16437

When merging our develop branch into my feature branch develop --> feature in Visual Studio, I get a merge conflict.
I have the possibility to choose from Take Source and Keep Target.

I want to take the file from the develop branch. Which one is the correct option?

enter image description here

2 Answers

I found @Kyle Vassella 's comment, above, worked best for me, i.e. use the "Merge"-button. It is simple, powerful and the ambiguity of the other options can be ignored.

I first "Compared files" (or "diff'd" them) using the above UI - just to get a feel for what I was dealing with. In my case, I could have then selected the Master version for one file and the branch for the other one and all would have been fine, but I would have lost a few comment tweaks and some tidying up of the code. Clicking on "Merge" allowed me to view both versions + VisualStudio2017's best guess at what the merged file should look like - its guess was extremely good. I could have just resolved 3 or 4 minor conflicts and accepted everything else. The UI provide buttons to find the next/previous Conflict and the next/previous Change. The former are the main thing, the latter are handy for double-checking everything.

I thought VS2017 Teams GIT lacked proper interactive MERGE capability - I was wrong, once found it is actually surprisingly good and simple to use. Harummph!

Related