git commit command with core.editor equals atom

允我心安 提交于 2019-12-02 11:53:17

问题


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:


try with:

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

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



来源:https://stackoverflow.com/questions/37706443/git-commit-command-with-core-editor-equals-atom

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!