[英]is there a command line equivalent to git mergetool.--keepBackup global config
而不是必须在全局配置中设置它(这是开发人员共享存储库时的问题),在我们的脚本中自动执行此操作会很好,但是git mergetool --help
没有提供任何东西。
You can pass any configuration variable to git
using the -c
option , eg: 您可以使用
-c
选项将任何配置变量传递给git
,例如:
git -c mergetool.keepBackup=false mergetool
should run git mergetool
with mergetool.keepBackup
set to false
. 应该运行
git mergetool
并将mergetool.keepBackup
设置为false
。
That's a bit long, so you may want to alias this, eg 这有点长,所以你可能想要别名,例如
alias.mt '!git -c mergetool.keepBackup=false mergetool'
alias.mtk '!git -c mergetool.keepBackup=true mergetool'
in the appropriate config file. 在适当的配置文件中。 Then
git mt
and git mtk
should run git mergetool
with keepBackup
set to false
and true
respectively. 然后
git mt
和git mtk
应该运行git mergetool
, keepBackup
分别设置为false
和true
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.