Found this somewhere, but cannot remember where.
[merge]
tool = meld
[mergetool "meld"]
# Choose one of these 2 lines (not both!) explained below.
cmd = meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"
# cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
# $LOCAL is the file in the current branch (e.g. master).
# $REMOTE is the file in the branch being merged (e.g. branch_name).
# $MERGED is the partially merged file with the merge conflict information in it.
# $BASE is the shared commit ancestor of $LOCAL and $REMOTE, this is to say the file as it was when the branch containing $REMOTE was originally created.