git - git commit 后无法通过评论部分?

标签 git commit git-commit git-bash

在我执行 git commit 后,它会提示我发表评论,以便我可以推送到 bitbucket,通常我按 alt+x,然后退出,然后 git push。但出于某种原因,它并没有让我退出。

committed new changes to bitbucket

Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit.
On branch master
Your branch is up-to-date with 'origin/master'.

Changes to be committed:
   new file:   blocks/folder-navigation.block
   new file:   blocks/index-album.block

....

最佳答案

根据您的描述,编辑器看起来像是 vim。
这个控制台只是告诉你为你想要提交的提交写一些消息,它是强制性的。

  • 只需输入 i然后你会进入 -- INTER --模式,现在你可以写你的评论了。
  • 完成后,按 esc键入键盘,您将进入命令模式。 (见控制台底部)
  • 现在通过写 :w 保存更改然后按 enter key

  • You can see the screenshot here for your reference
  • 您现在可以通过写信退出 :q然后按 enter key

  • you can see the screenshot here for your reference
  • 欢呼!现在您返回到主控制台。
  • 关于git - git commit 后无法通过评论部分?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32262264/

    相关文章:

    Github 提交语法以链接 pull 请求/问题

    git commit --amend - 未进行任何更改时更改提交哈希

    git commit 命令无限期挂起

    git - git add 后文件未显示在 git diff 中。我怎么知道它会被提交?

    git - 如何使用 Gitolite 设置 post-receive-email Git hook

    git - 为什么 git rm 不起作用?

    git - 致命的 : remote error: Could not find Repository octocat/myapp

    git - git rebase 可以完全删除远程历史记录吗?

    java - Spring Batch - 提交间隔和跳过限制

    git - 如何仅将我最新的提交与 git 同步?