2015-08-28 68 views
0

我做了一個混帳提交後,它會提示我評論,所以我可以推到bitbucket,通常我按alt + x,然後我退出,然後混帳推。但由於某種原因,它不會讓我退出。git commit後無法通過註釋部分?

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 

....

+0

這就是我所得到的文件底部.... { -^X模式(^)^ D^E^F^I^K^L^N^O^Ps^U^V^Y)} –

+1

它可以打開另一個編輯器,如vim或ed嗎?粘貼屏幕截圖。 –

+0

這意味着你的默認git編輯器是[nano](http://www.nano-editor.org/),你可以在git中更改你的[默認編輯器提交信息](http://stackoverflow.com/a/ 2596835/105104) – dvhh

回答

0

編輯器看起來像根據你的描述是VIM。 這個控制檯只是告訴你寫一些你想要提交的消息,這是強制性的。

  • 只需鍵入i你就可以走在-- INTER --模式,現在你可以寫你的意見。

  • 完成後,按鍵盤上的esc鍵,您將進入命令模式。 (看到在控制檯的底部)

  • 現在保存更改,通過按enter

You can see the screenshot here for your reference

  • 現在,您可以退出寫:w接着寫,然後:qenter

you can see the screenshot here for your reference

  • 萬歲!現在你回到了主控臺。