Nimit Bhardwaj
Nimit Bhardwaj

Reputation: 829

git commit command with core.editor equals atom

I have a problem with atom editor. I set atom as the core.editor by command:

git config --global core.editor atom

But when I try to commit the changes to a repository in git by

git commit

command, I expects that the editor of my choice will open and prompt for the commit message but before it opens git throws an error

Aborting commit due to empty commit message.

after it it opens the editor and when I enter the commit message and quits the editor no commit occurs, I know I can use command

git commit -m '<message>'

but I want to know why this error occurs and how to solve it.

Upvotes: 3

Views: 493

Answers (1)

Dario
Dario

Reputation: 4035

try with:

git config --global core.editor "atom --wait"

the atom --wait flag wait for window to be closed before returning.

Upvotes: 3

Related Questions