Git difftool not opening sometimes

I have 2 folders (with different code) with git initialized. But when I do

git difftool -t meld 

one repo is working fine and asking me if I want to open files in meld to compare. The other one just output everything in the console and didn’t execute meld.

  • git difftool runs git diff
  • after doing a git difftool --dir-diff, files are modified for some reason
  • Use Xcode 4 as Git difftool
  • git-difftool: full file tree compare using meld?
  • Unable to understand how Git's difftool configs are set
  • Is Git's auto-detection scripted or is it within some Git executable?
  • Also both .git/config file is the same (except for the url)

    Does anyone know why is that?

  • Is it possible to fork a public GitHub repo into an enterprise repository?
  • Doxygen for a project managed with git?
  • Is it possible to apply a commit to all branches in git?
  • How to get a git subtree diff?
  • How to push Android Project to existing private empty repository in github with Android Studio?
  • git ls-files in bare repository
  • 3 Solutions collect form web for “Git difftool not opening sometimes”

    You may have configured your diff.tool locally instead of globally (inspect the content of .git/config files in both your porjects, and your global ~/.gitconfig file).

    To set meld as your global difftool :

    git config --global diff.tool meld
    

    If in one repository you’re in conflicted state (check by git status), you need to use mergetool instead, e.g.

    git mergetool -t meld
    

    Related: git difftool runs git diff.

    Is it possible you have configured difftool, but not mergetool, and had a conflict outstanding?

    I found similar behaviour, when I had an existing conflict that needed resolving. I think what happened to me was that git was trying to be ‘helpful’ and launch mergetool when I asked for difftool. I had not set up any mergetool, only difftool. When I manually resolved the conflict with git add, difftool started working again. Very frustrating.

    Git Baby is a git and github fan, let's start git clone.