In one of my projects, I have some files with a specific extension that I would like to merge using a specific tool of my own instead of git itself.
I know it is possible to specify custom merge and diff tools in .gitconfig
this way :
[difftool "sourcetree"]
cmd = 'C:/somepath/difftool.exe' \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
cmd = 'C:/somepath/difftool.exe' \"$BASE\" \"$LOCAL\" \"$REMOTE\" -o \"$MERGED\"
That mergetool will be automatically call to resolve conflicts. However (unless I miss something) git will first try to merge files itself. What is wrong is that git will try to merge those files as regular text files (eg: code) and might miss the fact there is a conflict, or believe there are conflicts while there is not.
$ git merge foo
Auto-merging somefile //custom mergetool not called :(
CONFLICT (content): Merge conflict in index.html
Automatic merge failed; fix conflicts and then commit the result.
I would like my merge tool to be always called once a file has to be merged (without git trying to merge it automatically on it's own). Is this possible ?