我已经安装了git,p4merge和源代码树。我只想使用p4merge进行差异和合并。在打开sourcetree之前,git difftool
用于打开p4merge。但是现在,它仅显示命令行上的差异。为什么会发生这种情况,我该如何解决?
我将sourcetree设置为从sourcetree UI中使用p4merge,但没有用。删除sourcetree配置也不起作用(我打开了新的命令提示符,然后重试)。
这是我的全局.gitconfig文件:
[user]
name = Jason Taylor
email = jt@awesome.com
[core]
autocrlf = true
editor = 'C:\\notepad-plus\\notepad++.exe' -multiInst -notabbar -nosession -noPlugin
[color]
ui = true
[gui]
recentrepo = C:/myrepos/repo1
recentrepo = C:/myrepos/repo2
[diff]
tool = p4merge
[difftool "p4merge"]
path = C:\\Program Files\\Perforce\\p4merge.exe
[difftool]
prompt = false
[merge]
tool = p4merge
[mergetool "p4merge"]
path = C:\\Program Files\\Perforce\\p4merge.exe
[mergetool]
prompt = false
[credential]
helper = store
[difftool "sourcetree"]
cmd = 'C:/Program Files/Perforce/p4merge.exe' \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
cmd = 'C:/Program Files/Perforce/p4merge.exe' \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
trustExitCode = true
答案 0 :(得分:0)
可选的described here:
difftool
设置为p4merge
如果仍然失败,请在差异未打开的git config -l --show-origin
仓库中执行p4merge
,并检查设置是否被本地Git配置所覆盖。