【发布时间】:2016-02-07 22:39:51
【问题描述】:
我正在 git 沉浸式教程中进行合并实验室。当我进入
$ git merge master
我也是这样
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
我不知道如何完成合并。我已经尝试过C - X 和各种命令,例如:wq,它们似乎适用于vi 文本编辑器,但我相信我有emacs 编辑器。我知道让我离开编辑器并返回 shell(我正在使用 bash)的唯一命令是 C - Z,但这会撤消合并。
如何保存/完成合并?
已解决:根据以下建议,切换到编辑器“nano”,我能够完成合并。感谢您的帮助!
【问题讨论】:
-
也许您应该首先配置一个您熟悉和喜欢的编辑器。 :-) 使用
git config --global core.editor <name of editor>更改编辑器设置。 -
在“vi”、“nano”或其他之间有什么建议吗?对 git 和 shell 来说非常新。..
-
我自己使用 vi(现在是 vim),但这是因为它是 1981 年唯一合适的编辑器。