p4merge 错误 [GIT]
我正在尝试将 p4merge 与 git 一起使用,但我得到:
启动 p4merge 时出错:“path/myFile”是(或指向)无效文件(这列出了 BASE、LOCAL、REMOTE 和标准文件)文件的版本)。
Git 告诉我有关冲突的信息,然后它询问我是否要启动配置的合并工具 (p4merge),然后我收到上面的错误。
附加说明:任何文件都会发生这种情况!
关于这是什么以及如何解决它有任何线索吗?
I am trying to use p4merge with git but I am getting:
Error starting p4merge: "path/myFile" is (or points to) an invalid file (this lists the BASE, LOCAL, REMOTE, and standard version of the file).
Git tells me about the conflict then it asks if I wanna start the mergetool configured (p4merge) and then I get the error above.
Additional note: it happens with any file!
Any clue about what this is and how to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这对我在 Windows 7 上使用 msysGit 有用:
不知道为什么,但引用把我的事情搞砸了。
This worked for me using msysGit on windows 7:
Not sure why but the quoting screwed things up for me.
您将看到这里 我的 DiffMerge 或 KDiff3 配置。
基于此,我建议将 p4merge:
和
merge.sh
作为包装器(复制到PATH
环境变量引用的目录中),能够考虑到不存在BASE
的情况。(当在两个不同的分支中创建文件然后进行合并时,该文件将没有共同的祖先)
您可能会注意到:
PWD
使用merge.sh
脚本中调用的,您可以在其中切换任意数量的合并工具)$base
、$alocal
、$remote
、$result
括刚刚测试过(事实证明,您可以 仅下载并安装 p4merge -- 客户端/可视化合并工具部分 --,即使您没有安装任何其他 P4 产品)。
使用上述设置,MSysGit1.6.3、DOS 会话或 Git bash 会话:
它只是有效TM。
msysgit 1.7.x
更新评论中提到的
You will see here my config for DiffMerge or KDiff3.
Based on that, I would recommend for p4merge:
and
merge.sh
being a wrapper (copied in a directory referenced by yourPATH
environment variable), able to take into account the case where noBASE
exists.(when a file is created in two different branches being then merged, there would be no common ancestor for that file)
You may note:
PWD
in the config of the mergemerge
" as name of the merge.tool name (since the actual tool is called in themerge.sh
script, where you can switch between any number of merge tool you want)$base
,$alocal
,$remote
,$result
within the scriptJust tested it (it turns out, you can download and install only p4merge -- section Client/Visual Merge Tool --, even if you do not have any other P4 product installed).
With the settings describe above, MSysGit1.6.3, DOS session or Git bash session:
It just worksTM.
Update msysgit 1.7.x
Benjol mentions in the comments: