There is no automatic merge in any merge tool. Because it is the developer who should make the decision of which code should be versioned. So if you changed a code and checked in, there was no merge, but simply a version of the code, that is, a new version of it was saved.
At check-in TFS will tell you if there is a conflict when someone changes the same line of code that is being sent to the server. This would be a merge. For when two developers change the same code it is necessary to choose which lines or parts of it will be versioned. This choice, which can be part of a change from one developer and part of the other one is given the merge name.
If the version on the server is the same as the one that was previously downloaded and changed, there is no conflict. So, as stated earlier, there is no merge, so it looks like TFS does something automatically, but it’s not true.
See the image below:
You can choose a line or two in the Visual Studio merge tool, using the checkbox next to the source (1) and target (2), or even edit the line in the result frame.
To get to this screen, you will see a warning in Team Explorer the following warning:
Clicking on the link Resolves the Conflicts:
The list of conflicting files will be shown in Team Explorer again, if you want to fully overwrite a file just choose between Take Remote or Keep Local, if it is necessary to verify the code and use part of one with another click on the button Merge.
IMPORTANT:
Keep Visual Studio updated, in the 2013 version there was a bug in relation to the Merge button, it was necessary to make a workaround so that he would be enabled when a conflict arose.
is just this option to choose which code snippet will be inserted at check-in, it does not appear, I am not available this screen Accept Merge.
– Luiz Martinez
I added this part, see if this solves your doubt
– egomesbrandao
"There is no automatic merge in any merge tool." exists in Git, which is done in three phases. What changes is when both source and destination have a conflicting change that requires user resolution.
– Leonel Sanches da Silva
No, in Git what you’re calling an automatic tool is Fast Forward, but the process doesn’t happen on the server, but on the client. That is, it is still not automatic I have to "want" to merge, it happens on the developer’s machine, but FF is a shortcut that solves something I would not need to interact. When I say it doesn’t exist at all it’s because the check-in or commit is never done and solved directly, you need to execute an intermediate step.
– egomesbrandao