External git diffftool does not work with windows
I've been struggling with git for a lot of ours and have read almost all the threads given by "git", "diff", etc. and tried hundreds of different solutions but didn't succeed at all. I am trying to set sum external diffftool (Meld, p4merge) as a git tool BUT git ignore this option altogether. 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
The Mergetool command works great, but the diffftool is ignored and git always runs the inline diff. What am I doing wrong?
source to share
Most likely you are in merge mode (e.g. file .git/MERGE_MODE
exists or is being checked git status
), then you cannot use difftool
because the arguments are different, so you must use mergetool
.
If you want to abort the merge run: git merge --abort
then it difftool
should work.
See also: git diffftool runs git diff .
source to share