本文介绍了为什么我的Git mergetool配置不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将trustExitCode
设置为false,将keepTemporaries
设置为true,但是它不起作用...我不明白为什么.这是我的~/.gitconfig
:
I want to set trustExitCode
to false and keepTemporaries
to true but it does not work... I don't underestand why. Here is my ~/.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 、. ..
When I save some modification, either with p4merge, myp4merge or mymeld, Git doesn't ask me the expected "Was the merge successful? [y/n]" and does not leave file.BASE, file.REMOTE, ...
我找不到错误...
推荐答案
我认为您应该将path
设置添加到mergetool XYZ
配置而不是cmd
.这是我自己的设置,可以正常工作.
I think you should add path
setting to mergetool XYZ
config instead of cmd
. Here is my own setting that works properly.
[mergetool "kdiff3"]
path = PATH_TO_KDIFF3
trustExitCode = false
keepTemporaries = true
[mergetool]
keepBackup = true
[merge]
tool = kdiff3
conflictstyle = diff3
这篇关于为什么我的Git mergetool配置不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!