9

I have a set of branches off of main. One branch was created after main was rolled back another was created before this. Now upon trying to merge the two branches Source control is automatically overwriting all changes. How can I force it to allow me to manual compare and merge changes?

3
  • Most likely you will need to use a third party diff tool like WinMerge or Beyond Compare. Are you doing a baseless merge btw?
    – Mike Cheel
    Dec 16, 2013 at 21:12
  • No, regular merge through the ui my partner said he tried to do a baseless merge and it didn't work
    – Bob
    Dec 16, 2013 at 21:26
  • Baseless merges are not really recommended because of the pain. I think you are going to have to do a manual merge. You might be able to trick TFS into spawning a merge conflict which would enable you to use the built in tools but I would probably just use a diff tool.
    – Mike Cheel
    Dec 16, 2013 at 22:12

2 Answers 2

16

In Visual Studio go to Tools --> Options and uncheck "Attempt to automatically resolve conflicts when they are generated" marked in red in the image.

enter image description here

1
  • Commenting due to missing image: correct route is Tools -> Options -> Source Control -> Visual Studio Team Foundation Server
    – luisgepeto
    Oct 20, 2017 at 17:50
8

I prefer using tf.exe for forcing a merge:

tf.exe merge $/project/main/myfile.cs $/project/branch1/myfile.cs /force /v:t

this will force a merge of the file to the newest workspace even if tfs thinks all changesets have been merged.

you can also do a recursive merge to merge a folder/project

tf.exe merge $/project/main/consoleapplication1/views/ $/project/branch1/consoleapplication1/views/ /r /force /v:t
1
  • This is what i was after, but I also needed to use the /noautoresolve to get VS to prompt with the resolve conflicts dialog. However, there was some issue with the comparison and it wouldn't detect the differences and didn't show the version specified by /v:Cnnnn. I had to resort to some other method to do the merge manually.
    – John Mills
    Dec 6, 2018 at 3:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.