There is no automatic merge in any merge tool. For it is the developer who must make the decision of which code should be versioned. So if you changed a code and checked in, a merge was not done, but simply a versioning of the code, ie 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. That 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, is called merge.
If the version that is on the server is the one that was previously downloaded and changed, there is no conflict. So, as said before, there is no merge, so it looks like TFS does something automatically, but it's not true.
See the image below:
YoucanchooseonelineortheotherintheVisualStudiomergetool,usingthecheckboxesnexttosource(1)andtarget(2),orevenedittherowintheresultframe.
Togettothisscreen,youwillseeawarninginTeamExplorerfollowedbyawarning:
Clicking on the Resolve the conflicts link:
The list of conflicting files will be shown again in Team Explorer, if you want to overwrite a file entirely, just choose Take Remote or Keep Location if necessary check the code and use part of one with another click the Merge button.
IMPORTANT :
Keep Visual Studio up to date, there was a bug in the Merge button in the 2013 version, you had to do a workaround so that it would be enabled when a conflict appeared.