通过网站上的供应商包(而不是 Home brew)在我的 Mac(mac0S 10.13)上安装 P4merge 并像这样配置我的“git config --global”文件后,我无法让“git difftool”启动 P4merge:
[user]
name = (my name)
email = (my email)
[core]
editor = mate -w
[alias]
hist = log --all --graph --decorate --oneline
[diff]
tool = p4merge
[difftool "p4merge"]
path = /Applications/p4merge.app/Contents/MacOs/p4merge
[difftool]
prompt = false
[merge]
tool = p4merge
[mergetool "p4merge"]
path = /Applications/p4merge.app/Contents/MacOs/p4merge
[mergetool]
prompt = false
当我运行“git difftool”而不是打开 P4merge 时,我收到一条警报,提示“p4merge 意外退出”并在终端中显示以下消息:
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
/usr/local/Cellar/git/2.26.0/libexec/git-core/mergetools/p4merge: line 1: 22662 Abort trap: 6 "$merge_tool_path" "$LOCAL" "$REMOTE"
我试图卸载并重新安装 p4merge。如果我双击该应用程序并且不尝试从 git 中使用它,P4merge 就可以工作。
谢谢。这是我的第一个问题,所以如果我发布不正确,请告诉我!有很多类似的问题,但大多数似乎与 Python 有关,与我的不同。
挖舵