Why does git difftool use git diff instead?

I want git diff to be a quick command line solution to see the difference between two files, and then I want git difftool to launch meld for a more graphical view of the file differences.

Currently, git diff does exactly what I want it to, however when I run git difftool script.js, git tries to launch vimdiff instead of meld:

  • How to use git difftool to diff merge conflicts?
  • How to make git diff --ignore-space-change the default
  • Git: access a remote repository over ssh using a key file but without using ~/.ssh/config
  • Where does git config --global get written to?
  • How to make git diff --ignore-space-change the default
  • What should I do about user-specific config files (example: .idea/)?
  • Viewing (1/1): 'script.js'
    Launch 'vimdiff' [Y/n]:
    

    If I specify the tool with git difftool -t meld script.js it tries to launch meld as it should:

    Viewing (1/1): 'script.js'
    Launch 'meld' [Y/n]:
    

    How do I get git difftool <filename> to launch meld while git diff <filename> still uses vimdiff?

    My .gitconfig contains the following:

    [diff]
         tool = vimdiff
    [difftool]
        tool = meld
    [difftool "meld"]
        path = C:\\Program Files (x86)\\Meld\\Meld.exe
    

  • git client using GSSAPI for NTLM proxy authentication
  • Force git rebase to accept my version after an initial merge conflict
  • OpenShift WordPress Theme Developer workflow
  • Git clone hangs - is there a way to continue cloning?
  • Git Push Error: insufficient permission for adding an object to repository database
  • Prevent 'git checkout' if uncommitted changes
  • One Solution collect form web for “Why does git difftool use git diff instead?”

    git config --global diff.tool meld
    

    This will set the default difftool to meld. I.e. when you invoke git difftool without the --tool parameter, git will run meld.

    You can also remove that part of your config, git won’t read difftool.tool as it’s not one of git’s known config options:

    [difftool]
        tool = meld
    
    Git Baby is a git and github fan, let's start git clone.