Aborting commit due to empty commit message

后端 未结 20 2063
[愿得一人]
[愿得一人] 2020-12-04 09:45

As a newbie git user, when I try to commit my work with

git commit -a -v

and I enter a commit message in my editor, I close the file, and g

20条回答
  •  孤街浪徒
    2020-12-04 10:14

    I got this error, and even though i used git config --global core.editor "code -w", it still wouldn't wait for me to close the file. It would just abort instantly.

    My problem was that I had run this command earlier git config core.editor "code".

    It seems that core.editor (which I presume is a local working directory specification), took precedence over --global core.editor.

    If git config --global core.editor "code -w" (or whatever editor you are trying to use) does not work for you, try omitting the --global.

提交回复
热议问题