2

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)

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

7 Comments

It returns nothing: ibb.co/qYwRYM5
@GaussGun OK so can you configure it and see if you can retry your commit?
I'm having problems with setting atom as editor. I have it installed, but command git config --global core.editor "atom --wait" stated on atom offical page is not working. GIt says cannot spawn atom: No such file or directory. What am I doing wrong?
@GaussGun You might need to specify the full path of the exe, as in here.
thanks, needed to specify the path. But now it opens Atom in a window, and immediately I get Aborting commit due to empty commit message. in my terminal. I downloaded wrong Atom?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.