Using atom as a git editor fails to wait for commit message, why?

馋奶兔 提交于 2019-12-30 18:54:28

问题


I have configured my git editor both by:

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

or

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

based on some posts in StackOverflow.

And my .gitconfig file has oneline like:

editor = atom -w

or:

editor = atom --wait

However, when I tried to use git commit, the git aborted commit due to empty commit message. After that, Atom launched after that. If I typed in commit message, save and quit. The message in bash is:

 Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object. Remote event names: destroyed, crashed

Could anyone help me? Thanks very much in advance.


回答1:


I don't have atom installed, but I did a similar thing for VS Code. Have you tried putting the command and the switch together inside quotes?

editor = 'atom -w'

I've been doing that with the Bash EDITOR shell variable, since my default editor changes depending which OS I'm on at the time, whether I'm using SSH or not; so setting it inside the Git config for a project is not a solution for me. But it may be for you.

So please try that and tell us what happens.



来源:https://stackoverflow.com/questions/48886343/using-atom-as-a-git-editor-fails-to-wait-for-commit-message-why

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