我已经通过以下方式配置了我的 git 编辑器:
git config --global core.editor "atom --wait"
或
git config --global core.editor "atom -w"
基于 StackOverflow 中的一些帖子。
我的 .gitconfig 文件有一行:
editor = atom -w
或:
editor = atom --wait
但是,当我尝试使用 git commit 时,由于提交消息为空,git 中止了提交。在那之后,Atom 推出了。如果我输入提交信息,保存并退出。 bash 中的消息是:
Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object. Remote event names: destroyed, crashed
谁能帮帮我?非常感谢。
最佳答案
我没有安装 atom,但我为 VS Code 做了类似的事情。您是否尝试过将命令 和 开关放在引号内?
editor = 'atom -w'
我一直在用 Bash EDITOR
shell 变量来做这件事,因为我的默认编辑器会根据我当时使用的操作系统而改变,无论我是否使用 SSH;所以在项目的 Git 配置中设置它对我来说不是解决方案。但它可能适合你。
所以请尝试一下,然后告诉我们会发生什么。
关于git - 使用 atom 作为 git 编辑器无法等待提交消息,为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48886343/