git commit -a confusion

前端 未结 4 720
面向向阳花
面向向阳花 2020-12-13 13:34

I am using Git Bash and am trying to figure out what is happening when I type \'git commit -a\'.

Looks like VIM opens up to edit my commit message but how do I save

4条回答
  •  被撕碎了的回忆
    2020-12-13 14:13

    To save your commit you save and exit the file as you normally would in vim.

    :wq
    

    If you change your mind and want to abort you exit without saving.

    :q!
    

    You don't have to use VIM though, you can set the editor, for example the following would change the editor git uses to textmate.

    git config --global core.editor textmate
    

提交回复
热议问题