windowsgitdiffmsysgitaraxis

How to set Araxis as diff / merge tool for MSYS git?


I'm trying to use Araxis Merge as my diff / merge tool for MSYSGit.

I found a few resources on the net:

I created /bin/git-diff-driver.sh

#!/bin/sh

"/c/Program Files/Araxis/Araxis Merge/compare.exe" -title1:"$1 (repo version)" -title2:"$1 " -max "$2" "$5"

and edited gitconfig

[merge]
    tool = araxismerge
[mergetool "araxismerge"]
    cmd = "/c/Program Files/Araxis/Araxis Merge/compare.exe" -3 -merge -wait $LOCAL $BASE $REMOTE $MERGED
[diff]
    external = "/bin/git-diff-driver.sh"

and the only result I get is:

$ git diff HEAD^ HEAD
external diff died, stopping at PowerEditor/src/Notepad_plus.cpp.


Edit:

I've also tried with the exe named as "c:/Program Files/Araxis/Araxis Merge/compare.exe" as suggested by one of the answers, with the same results.


Edit:

I've found that it can easily be set if you use TortoiseGit, but it seems to handle diff by itself and no settings from TortoiseGit give any indication on how to set up Araxis as a merge tool when diff is invoked from the command line.


Edit:

So, the question is: Is there anybody who successfully uses Araxis Merge to diff and merge stuff with MSYSGit, and if so, how do you it?


Solution

  • If you want to have 'git diff' always use araxis you can use the instructions in the help file, but if you want to have control to use 'git diff' as you normally would from the command line and 'git difftool' to engage the Araxis GUI.

    Try adding the following to your git config::

    [difftool "araxis"]
        path = "/c/Program Files/Araxis/Araxis Merge/compare.exe"
        renames = true
        trustExitCode = true
    [diff]
        tool = araxis
        stat = true
    [mergetool "araxismergetool"]
        cmd = 'C:\\Program Files\\Araxis\\Araxis Merge\\araxisgitmerge.exe' "$REMOTE" "$BASE" "$PWD/$LOCAL" "$PWD/$MERGED"
        trustExitCode = false
    [mergetool]
        keepBackup = false
    [merge]
        tool = araxismergetool
        stat = true