我可以帮助您解决在Windows 10上如何让Meld在Git Bash中工作的问题。我已经按照一些指示进行了尝试,但都没有成功。
在我输入下面这些命令后,什么都没有发生:
git config --global diff.tool meld
git config --global difftool.meld.path "/c/Program Files(x86)/Meld/Meld.exe"
git config --global difftool.prompt false
使用git difftool
命令后,我得到了这个奇怪的错误:
git config option diff.tool set to unknown tool: merge
Resetting to default...
This message is displayed because 'diff.tool' is not configured.
See 'git difftool --tool-help' or 'git help config' for more details.
'git difftool' will now attempt to use one of the following tools:
opendiff kdiff3 tkdiff xxdiff meld kompare gvimdiff diffuse diffmerge ecmerge p4merge araxis bc codecompare emerge vimdiff
2 files to edit.
我也尝试了以下路径:
- /c/Progra~2/meld/bin/
- "/c/Program files (x86)/Meld/"
- "c:/Program files (x86)/Meld/"
我的配置文件:
[user]
name = user
email = email@sample.com
[merge]
tool = meld
[mergetool "meld"]
cmd = meld --auto-merge \"$LOCAL\" \"$BASE\" \"$REMOTE\" --output \"$MERGED\" --label \"MERGE (REMOTE BASE MY)\"
trustExitCode = false
[mergetool]
prompt = false
keepBackup = false
[diff]
guitool = meld
tool = meld
[difftool "meld"]
cmd = meld \"$LOCAL\" \"$REMOTE\" --label \"DIFF (ORIGINAL MY)\"
path = C:/Program Files(x86)/Meld/Meld.exe
[difftool]
prompt = false
git diff
而不是直接使用difftool。 - Bsquare ℬℬ