如何强制git merge
使用默认合并消息而不是使用所述消息加载我的编辑器?
我没有列出编辑器git config -l
,所以我不确定为什么它会打开一个编辑器.
kjb*_*kjb 85
经过一番挖掘后找到了答案
编辑:根据马克的建议,这是最好的方法:
git config --global core.mergeoptions --no-edit
Run Code Online (Sandbox Code Playgroud)
oua*_*uah 62
使用
export GIT_MERGE_AUTOEDIT=no
Run Code Online (Sandbox Code Playgroud)
要么
git merge --no-edit
Run Code Online (Sandbox Code Playgroud)
这是Git 1.7.10中引入的Git的一个新功能,使用旧的(在合并时不提供消息)将这两行放在你的.bash_profile
或.bashrc
GIT_MERGE_AUTOEDIT=no
export GIT_MERGE_AUTOEDIT
Run Code Online (Sandbox Code Playgroud)