问题
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?
回答1:
Most likely you're in merge mode (e.g. .git/MERGE_MODE
file exists or check by git status
), then you cannot use difftool
, because the arguments are different, so you've to use mergetool
.
If you'd like to abort the merge, run: git merge --abort
, then difftool
should work.
See also: git difftool runs git diff.
来源:https://stackoverflow.com/questions/30623163/external-git-difftool-is-not-working-on-windows