“请输入更改的提交消息”

Den*_*isM 21 windows git vi git-commit

在此输入图像描述

这扇窗户让我抓狂

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
Run Code Online (Sandbox Code Playgroud)

当我忘记在“git commit”之后放置 -m"[message]" 时,它就会弹出,现在当我尝试“git revert”时,我已经看到了如何中止此操作的说明,但如果我真的想要怎么办提交提交消息?我怎么做?按回车键不起作用,那么怎么办呢?

Tus*_*ahi 45

第一行之前

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
Run Code Online (Sandbox Code Playgroud)

正是用于添加您的提交消息。

您按i,然后进入insert模式。您可以在文本中导航并插入您想要的内容。完成后,按Esc。这会让你退出insert模式。接下来你必须按:wq,这意味着写入并退出。

这将保存您的提交消息。

  • 我想我多次来这里只是为了记住那个愚蠢的命令:wq我很高兴我没有处于石器时代的编程中,一切都是这样的 (4认同)