简体   繁体   中英

External git difftool is not working on windows

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 (eg .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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM