为什么我的git mergetool配置不起作用



我想将 trustExitCode设置为false,而 keepTemporaries将其设置为true,但它不起作用……我不明白为什么。这是我的~/.gitconfig

[merge]
        conflictstyle = diff3
        tool = p4merge
[mergetool]
        keepTemporaries = true
        keepBackup = true
        trustExitCode = false
[mergetool "p4merge"]
        trustExitCode = false
        keepTemporaries = true
[mergetool "mymeld"]
        cmd = meld --diff $BASE $LOCAL --diff $BASE $REMOTE --diff $LOCAL $MERGED $REMOTE
        trustExitCode = false
        keepTemporaries = true
[mergetool "myp4merge"]
        cmd = p4merge $BASE $LOCAL $REMOTE $MERGED
        trustExitCode = false
        keepTemporaries = true

当我使用P4Merge,Myp4Merge或Mymeld保存一些修改时,Git不会问我预期的"合并成功?[Y/N]",并且不会离开file.base,file.remote,。..

我找不到错误...

我认为您应该将path设置添加到mergetool XYZ配置而不是cmd。这是我自己的设置,可以正常工作。

[mergetool "kdiff3"]
    path = PATH_TO_KDIFF3
    trustExitCode = false
    keepTemporaries = true
[mergetool]
    keepBackup = true
[merge]
    tool = kdiff3
    conflictstyle = diff3

相关内容

  • 没有找到相关文章