Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 427
Nimit Bhardwaj Avatar asked Feb 19 '26 23:02

Nimit Bhardwaj


1 Answers

try with:

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

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

like image 87
Dario Avatar answered Feb 22 '26 23:02

Dario



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!