Setup Meld for git difftool

Meld is a cool visual tool available in linux to compare files, we can use it to merge or diff git.

Lets integrate it with the git.

$ git config --global --edit

Add following configuration to git config.


[ diff ]
    tool = meld

[difftool]
    prompt = false

[difftool "meld"]
   cmd = /usr/bin/meld "$LOCAL" "$REMOTE"

[merge]
    tool = meld

[mergetool "meld"]
    cmd = /usr/bin/meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"


To compare git branches directory vise

git difftool --dir-diff branch-to-compare

Leave a Reply

Your email address will not be published. Required fields are marked *