Successfully using the branching and merging features of your source control tool is first a matter of attitude on the part of the developer. No matter how much help the version control tool provides, it is not as smart as you are. You are responsible for doing the merge. Think of the tool as a tool, not as a consultant.
After your version control tool has done whatever it can do, it’s your turn to finish the job. Any conflicts need to be resolved. Make sure the code still builds. Run the unit tests to make sure everything still works. Use a diff tool to review the changes.
Merging branches should always take place in a working copy. Your version control tool should give you a chance to do these checks before you commit the final results of a merge branches operation.