3

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.

1 Answer 1

3

try with:

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

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

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

2 Comments

Didn't worked for me on MacOS BigSur with zsh!!
@iCantC this works for me: git config --global core.editor "/Applications/Atom.app/Contents/Resources/app/atom.sh -n -w"

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.