4

Is it possible to set TextMate 2 as the default Git difftool/mergetool?

If so, what are the commands?

I have found instructions for the diffmerge tool here, but I would like to try it with text mate, but I know that are the commands to use.

I am using Mac OS X 10.8 by the way.

slhck
  • 223,558
  • 70
  • 607
  • 592
Tiago Veloso
  • 1,080
  • 1
  • 9
  • 16
  • Can textmate 2 be used as a diff/merge tool by default? I found that it has a [diff bundle](http://manual.macromates.com/en/bundles), is that what you plan on using? – 40XUserNotFound Aug 03 '13 at 22:02
  • I would like to use that bundle yes. But I am not sure that it can be used as such a tool. – Tiago Veloso Aug 05 '13 at 13:46

1 Answers1

1

For a start;

git config --global diff.tool tmdiff
git config --global difftool.tmdiff.cmd 'git diff "$LOCAL" "$REMOTE"|mate'

which is run with git difftool

or

git diff | mate

Neither will get you the ability to merge the files, is that important to you?

git config --global core.editor "/usr/local/bin/mate -w"

Will set TextMate as the default editor, which I believe is how I'm resolving merge conflicts in TextMate.

As for the Diff bundle, it's just working for me.