git mergetool says there is nothing to merge (but there is!)

825 Views Asked by At

Say I have a file and I have two branches: master and anotherbranch.

The current situation is that from the point of divergence, master branch has one commit (say a line in the file says "This is master") and the "anotherbranch" branch also has a commit (the same line says "this is another").

Obviously if you checkout master and do git merge there is going to be conflict and you can solve it by solving the conflict and commiting the branch.

But now I want to try the git mergetool tool so I checkout master and I do:

git mergetool

This message is displayed because 'merge.tool' is not configured.
See 'git mergetool --tool-help' or 'git help config' for more details.
'git mergetool' will now attempt to use one of the following tools:
tortoisemerge emerge vimdiff
No files need merging

Anyway disregard the first part (I solved that by configuring the tool) but notice the last line No files need merging

What? no files need merging. Well that is simply not true. The file needs merging so why is this not working?

0

There are 0 best solutions below