gpt4 book ai didi

windows - 混帐(窗口); P4merge 作为 mergetool 错误

转载 作者:可可西里 更新时间:2023-11-01 14:23:16 26 4
gpt4 key购买 nike

我已经尝试将 p4merge 设置为我的 merge 工具,但我似乎无法让它工作。这是我的命令:

git config --global merge.tool p4merge
git config --global mergetool.p4merge.path "C:/Program Files/Perforce/p4merge.exe"
git config --global mergetool.p4merge.cmd "p4merge.exe \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\""

这是我得到的错误: enter image description here

我也试过安装 portable version of git并从 windows cmd prompt and I still get a similar error 运行命令.

这里有什么想法吗?我很难过。

编辑

奇怪的是,在我通过 git bash 设置 p4merge 但失败后,我尝试在 Visual Studio 的团队资源管理器和 it launched p4merge 中 merge (桌面翻转)。我想通过 VS 启动的命令类似于 git bash,但我不确定如何将两者关联起来。

编辑2:

这是我的 git status 显示我的 merge 冲突状态: enter image description here

最佳答案

首先,在常规 cmd session 中尝试使用相同的配置命令(正如我在“escape double quotes in git config from cmd”中提到的)。
只要确保你已经解压了 latest git-for-windows ( PortableGit-2.8.3-64-bit.7z.exe ),例如 C:\git,并将 C:\git\bin 添加到您的 %PATH%

其次确保您有需要 merge 的文件,即。有 Unresolved merge 冲突(其中有 merge conflict markers),为了 git mergetool去工作。

关于windows - 混帐(窗口); P4merge 作为 mergetool 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37336139/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com