I describe what I use here .
Basically, add the following lines to your "~ / .gitconfig":
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = default-difftool.sh $LOCAL $REMOTE
With the following shell script:
#! /bin/bash
if [[ -f /Applications/MacVim.app/Contents/MacOS/Vim ]]
then
VIMPATH='/Applications/MacVim.app/Contents/MacOS/Vim -g -dO -f'
elif [[ -f /usr/local/bin/mvim ]]
then
VIMPATH='mvim -d -f'
else
VIMPATH='vimdiff'
fi
$VIMPATH $@
source
share