2

我想设置trustExitCode为 false 和keepTemporariestrue 但它不起作用......我不明白为什么。这是我的~/.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、...

我找不到错误...

4

1 回答 1

0

我认为您应该将path设置添加到mergetool XYZconfig 而不是cmd. 这是我自己的正常工作的设置。

[mergetool "kdiff3"]
    path = PATH_TO_KDIFF3
    trustExitCode = false
    keepTemporaries = true
[mergetool]
    keepBackup = true
[merge]
    tool = kdiff3
    conflictstyle = diff3
于 2014-03-07T15:11:01.487 回答