I'm struggling with git for many ours and have read almost all topics taged by "git", "diff" etc. and tried hundred of different solutions, but did not succeeded at all. I'm trying to set sum external difftool (Meld, p4merge) as my git tool, BUT git ignoring this option at all. Here is my git config --global.
[alias]
st = status
co = checkout
ci = commit
[diff]
tool = p4merge
[difftool "p4merge"]
cmd = p4merge.exe $LOCAL $REMOTE
[difftool]
prompt = false
[merge]
tool = p4merge
[mergetool "p4merge"]
cmd = p4merge.exe $BASE $LOCAL $REMOTE $MERGED
[mergetool]
prompt = false
trustExitCode = false
keepBackup = false
Mergetool command is working perfectly, but difftool is ignored and git starts always build-in diff. What i'm doing wrong?
Most likely you're in merge mode (e.g.
.git/MERGE_MODE
file exists or check bygit status
), then you cannot usedifftool
, because the arguments are different, so you've to usemergetool
.If you'd like to abort the merge, run:
git merge --abort
, thendifftool
should work.See also: git difftool runs git diff.