Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git提交后无法通过注释部分?_Git_Commit_Git Commit_Git Bash - Fatal编程技术网

git提交后无法通过注释部分?

git提交后无法通过注释部分?,git,commit,git-commit,git-bash,Git,Commit,Git Commit,Git Bash,在我完成git提交后,它会提示我进行评论,这样我就可以推到bitbucket,通常我会按alt+x,然后退出,然后按git。但出于某种原因,它不允许我退出 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 br

在我完成git提交后,它会提示我进行评论,这样我就可以推到bitbucket,通常我会按alt+x,然后退出,然后按git。但出于某种原因,它不允许我退出

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
    键保存更改

  • 您现在可以通过写入
    :q
    ,然后按
    enter
    键退出

  • 万岁!现在回到主控制台

这是我在文件底部得到的。。。。{--^X模式(^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)}它会打开另一个编辑器,比如vim或ed吗?粘贴屏幕截图。这意味着您的默认git编辑器是,您可以通过以下方式更改您的设置:
^
字符通常表示
ctrl
,这意味着要退出,您需要按
ctrl
+
X
是的。我想我明白了,它在vim里。按zz键帮助我退出并保存。“我今天就试试这个。”沙尘暴尼克说,“如果答案有帮助,我们干脆投票表决。”。谢谢