3

我想在 Git 中使用 SemanticMerge 作为我的合并工具,但是当我尝试执行合并时,我收到来自 SemanticMerge 的投诉,说它无法找到文件C:\Program Files (x86)\Git\my_repo_name\my_project\MyFile.cs.BASE.1234.cs- 这是绝对正确的,因为它应该在C:\repositories\my_repo_name\my_project\MyFile.cs等等。出于某种原因,尽管 Git 在其他所有方面都在使用存储库,但似乎决定传递 $BASE、$LOCAL 和 $REMOTE 文件路径,并在前面加上 Git 安装路径,而不是存储库根目录。

我一直在使用他们自己的教程中建议的配置作为起点,如果给出正确的路径,该工具似乎可以正常工作,所以我猜测在 Git 和 MsysGit 之间的某个地方,存在一些配置错误或通信错误。

4

1 回答 1

4

我不确定 SemanticMerge 配置是否是您的问题,但如果是,您可以尝试使用这些设置。我让它在我的工作机器上工作,但这些是我的个人机器设置,所以它们可能还没有更新。顺便说一下,这些设置适用于 Windows 7 上的 msysgit:

[mergetool "sm"]
    keepBackup = false
    trustExitCode = false
    cmd = 'C:/Users/<user>/AppData/Local/PlasticSCM4/semanticmerge/semanticmergetool.exe' -b=\"$BASE\" -d=\"$LOCAL\" -s=\"$REMOTE\" -r=\"$MERGED\" -l=csharp -emt=\"mergetool.exe -b=\"\"@basefile\"\" -bn=\"\"@basesymbolic\"\" -s=\"\"@sourcefile\"\" -sn=\"\"@sourcesymbolic\"\" -d=\"\"@destinationfile\"\" -dn=\"\"@destinationsymbolic\"\" -r=\"\"@output\"\" -t=\"\"@filetype\"\" -i=\"\"@comparationmethod\"\" -e=\"\"@fileencoding\"\"\" -edt=\"mergetool.exe  -s=\"\"@sourcefile\"\" -sn=\"\"@sourcesymbolic\"\" -d=\"\"@destinationfile\"\" -dn=\"\"@destinationsymbolic\"\" -t=\"\"@filetype\"\" -i=\"\"@comparationmethod\"\" -e=\"\"@fileencoding\"\"\"
于 2013-08-19T17:10:29.437 回答