配置git mergeoptions - 不在所有分支上编辑 [英] Configure git mergeoptions --no-edit on all branches
问题描述
我试图将git配置为在合并时始终接受默认合并消息(使用选项--no-edit)。我发现这个答案( Git合并不使用默认合并信息,使用默认信息打开编辑器)但它不起作用对我而言,它并未列在手册中( git-config )。
以下配置(使用实际分支名称而不是*)对单个分支起作用,但我需要
[分支*]
mergeoptions =所有分支的配置,所以我尝试了这一点,无济于事。 --no-edit
是否有全局配置可以做到这一点?
编辑
在搜寻我时nd 分支*配置稍后作为补丁提出,但从未实现过( [PATCH]为所有分支添加默认合并选项)。
用附加 - no-edit $的别名覆盖
merge
命令c $ c>似乎工作:
[别名]
合并=合并 - 无编辑
I'm trying to configure git to always accept the default merge message when merging (with option --no-edit). I found this answer (Git merge doesn't use default merge message, opens editor with default message) but it doesn't work for me, and it is not listed in the manual (git-config).
The following configuration (with an actual branch name rather than "*") does work for a single branch, but I need the configuration on all branches, so I tried this, to no avail.
[branch "*"]
mergeoptions = --no-edit
Is there any global configuration to do this ?
EDIT
While searching I found the branch "*" configuration was proposed a while back as a patch, but never implemented ([PATCH] Add default merge options for all branches).
Overriding the merge
command with an alias that appends --no-edit
seems to work:
[alias]
merge = merge --no-edit
这篇关于配置git mergeoptions - 不在所有分支上编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!