git - 使用 atom 作为 git 编辑器无法等待提交消息,为什么?

标签 git atom-editor

我已经通过以下方式配置了我的 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/

相关文章:

git - 以井号 (#) 开始 Git 提交消息

git - 我们如何在 git 中 merge 两个存储而不提交任何存储?

linux - 推送到服务器时的 Gitolite 错误

git - 如何将现有的 Git 存储库推送到 Team Foundation Service

github - 如何调用原子包?

java - 如何让 javafx 14 编译并运行?

atom-editor - 有没有办法将多个主题应用于 Atom 编辑器 session ,例如每个 Pane 、每个文件等?

git - 在 OS X 上安装 Git

atom-editor - 如何在 Atom 的 linter-spell 词典中添加单词

linux - 如何正确杀死 child_process ?