I was using git in JetBrains IDE WebStorm terminal (based on Windows PowerShell). While trying to commit without a message, I got this message:
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
I tried searching how to exit that, but nothing worked (ESC -> :wq or ctrl c -> ctrl x or other editor commands, but since I never set the editor, it should be Vim). I guess that's because when I press ESC, IDE escapes the terminal and throws me to code editing window, and the editor never gets to read that ESC.
Is there any way to exit, or I have to restart the terminal?
(Please don't tell me how to change default editor, I definately will do this later)
CodePudding user response:
but since I never set the editor, it should be Vim
Check what git config core.editor
returns (from the root folder of your repository, in your IDE Powershel terminal)
That way, you will know more about the actual nature of the editor (as illustrated here), which can then guide you in your search to exit it.
As noted in the comments, since git config core.editor
is empty, it is best to set it up, avoiding the default behavior.