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?
-
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 CheelDec 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– BobDec 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 CheelDec 16, 2013 at 22:12
2 Answers
In Visual Studio go to Tools --> Options and uncheck "Attempt to automatically resolve conflicts when they are generated" marked in red in the image.
-
Commenting due to missing image: correct route is Tools -> Options -> Source Control -> Visual Studio Team Foundation Server Oct 20, 2017 at 17:50
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
-
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. Dec 6, 2018 at 3:57