1

When running git difftool --tool=vimdiff the output I get is a diff, what I want is vimdiff... If I use git diff I get a diff | less

I try configuring the global setting:

git config --global diff.tool vimdiff

the local setting, adding the following into .git/config of the local repo

[diff]
tool = vimdiff

changing git version (currently git version 2.11.0 and before git version 2.7.4)

Plus, I have the following doing which vimdiff:

/usr/bin/vimdiff

And running git difftool --tool-help

    'git difftool --tool=<tool>' may be set to one of the following:
            araxis
            gvimdiff
            gvimdiff2
            gvimdiff3
            vimdiff
            vimdiff2
            ...

It seems I am not the only one but I found no solution, any idea? ( git difftool runs git diff and Git difftool not opening sometimes, External git difftool is not working on windows)

Community
  • 1
  • 1
Corentin
  • 11
  • 4

2 Answers2

1

If you're in conflicted state, use git mergetool instead of git difftool, e.g.

git mergetool -t vimdiff
kenorb
  • 155,785
  • 88
  • 678
  • 743
0

Bad question... It seems that after a git stash pop a conflict appears... I still don't get why git difftool was not working but once the files were merged, difftool (with vimdiff) starts working again.

Corentin
  • 11
  • 4
  • FYI I just answered an older similar question [here](http://stackoverflow.com/a/42314578/1056941) (my search turned that one up before this). In my case the fix was just to update to git v2.11.1 – ronen Feb 18 '17 at 11:34