41

After a merge failed with some conflicts I can list those with git diff, but git difftool won't display them with the difftool set in the config(in my case Kaleidoscope), instead it will just use normal diff.

A git difftool comparing with a previous commit will work.

Is there a way to use git difftool on merge conflicts?

Greets Jan

j-pb
  • 822
  • 2
  • 8
  • 12
  • I have had this exact experience, but using meld instead of Kaleidoscope. `git meldtool` works, but `git difftool` reverts to `git diff` even though it works normally when there isn't a merge conflict to resolve. I thought it was odd. – Mark Mikofski Aug 20 '12 at 22:49

2 Answers2

42

Try git mergetool.

3lectrologos
  • 9,469
  • 4
  • 39
  • 46
  • 2
    Mergetool will start an visual merging attempt e.g another app, I simply want a diff off the 2 conflicting files, the problem is that although `git difftool refA refB` normaly works, a `git diff` and `git diftool` will do the same in this case. – j-pb Sep 19 '10 at 08:03
2

Firstly try:

git difftool -t <yourtool>

If that doesn't work, look at man git-difftool and check the list of supported tools. Check if one of those does what you want, if it does then you've narrowed it down to git not supporting Kaleidoscope, which may need some other config tweaking.

Andrew
  • 2,943
  • 18
  • 23
  • 1
    I already configured it and `git difftool refA refB` works fine, what I want to do is use difftool when a merge failed do display the differences in the conflict files, git `diff defaults` works at this point but using difftool does the same as diff. It doesn't start kaleidoscope but it uses diff too. – j-pb Sep 19 '10 at 07:58
  • 1
    In that case I would agree with 3lectrologos. I normally do this with git mergetool. – Andrew Sep 19 '10 at 11:33
  • 1
    It's a bit hard to tell from the support site, but I think mergetool support is not yet in Kaleidoscope, only difftool. – Ryan McCuaig Dec 16 '10 at 16:17