1

I currently use meld for git diff. I have configured it this way:

I've added git-meld to /bin:

#!/bin/bash
meld "$2" "$5"

made it executable

chmod +x git-meld

and added it to my git configuration:

git config --global diff.external git-meld

This works fine when I work locally. But when I'm logged in via SSH, I get an error message.

It would be great if I could use meld while I'm logged in via SSH, but using the standard diff would also be ok.

So my question is: How can I have a graphical 'diff' for git when working locally and also use diff via SSH?

4

1 回答 1

2

git-meld大致如下更改您的脚本:

if [ $DISPLAY ]; then
    exec meld "$2" "$5"
else
    exec diff "$2" "$5"
fi
于 2014-04-10T14:17:29.237 回答