git合并--不打开编辑器继续

git合并--不打开编辑器继续,git,merge,editor,Git,Merge,Editor,我正在编写一个脚本,它经历了许多git操作。git合并失败。在合并操作中,我为文本消息提供了-m。如果在处理了冲突之后,我运行git merge-continue,我会看到一个编辑器,并且我能够看到我在第一次合并操作中使用的行,以便编辑它们。现在,我要做的是运行git merge-continue,但我也希望git允许我最初用于修订的消息。如果我尝试使用git merge-continue-no edit,它会失败得很惨: $ git merge --continue --no-edit fat

我正在编写一个脚本,它经历了许多git操作。git合并失败。在合并操作中,我为文本消息提供了-m。如果在处理了冲突之后,我运行git merge-continue,我会看到一个编辑器,并且我能够看到我在第一次合并操作中使用的行,以便编辑它们。现在,我要做的是运行git merge-continue,但我也希望git允许我最初用于修订的消息。如果我尝试使用git merge-continue-no edit,它会失败得很惨:

$ git merge --continue --no-edit
fatal: --continue expects no arguments

usage: git merge [<options>] [<commit>...]
   or: git merge --abort
   or: git merge --continue
.
.
.
然后我再次尝试设置消息:

$ git merge --continue -m "BLAH"
fatal: --continue expects no arguments

usage: git merge [<options>] [<commit>...]
   or: git merge --abort
   or: git merge --continue
.
.
.

那么,我如何运行git merge?继续跳过文本编辑器并接受原始注释?

尝试几次后,我通过将core.editor设置为/bin/true实现了这一点:

也应该像这样工作:

GIT_EDITOR=/bin/true git merge --continue

经过几次尝试后,我通过将core.editor设置为/bin/true成功:

也应该像这样工作:

GIT_EDITOR=/bin/true git merge --continue

要么欺骗运行git commit而不是git merge-continue,要么欺骗将编辑器设置为“不做任何事情并成功”命令,例如,git_editor=true git merge-continue。对。。。。能够通过-c core.editor实现。你在等我发帖吗-DEither cheat运行git commit而不是git merge-continue,或者cheat将编辑器设置为“不做任何事情并成功”命令,例如,git_editor=true git merge-continue。对。。。。能够通过-c core.editor实现。你在等我发帖吗-DWorks也为rebase工作。可以缩短:git-c core.editor=true rebase-continueWorks也用于rebase。可以缩短:git-c core.editor=true rebase-continue