Search code examples
gitvimdiffgit-difftool

Why git difftool does not open vimdiff in case of conflicts?


After reading this, I configured git to use vimdiff as diff/merge tool by adding following lines to my ~/.gitconfig:

[diff]
        tool = vimdiff
[merge]
        tool = vimdiff
[difftool]
        prompt = false
[alias]
        d = difftool

But git difftool still just prints diff (no vimdiff). Any ideas?

UPDATE. Seems like git difftool works fine, if I have some uncommitted changes in repo, i.e. it opens vimdiff as expected. But it fails to open vimdiff if I do git difftool after merge with conflict. Any ideas why?


Solution

  • Ok, I found the answer here. git mergetool must be used instead of git difftool in case of conflicts.