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
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.