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

X.G*_*X.G 5 git atom-editor

我已经配置了我的git编辑器:

git config --global core.editor "atom --wait"
Run Code Online (Sandbox Code Playgroud)

要么

git config --global core.editor "atom -w"
Run Code Online (Sandbox Code Playgroud)

基于StackOverflow中的一些帖子.

我的.gitconfig文件就像在线一样:

editor = atom -w
Run Code Online (Sandbox Code Playgroud)

要么:

editor = atom --wait
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试使用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
Run Code Online (Sandbox Code Playgroud)

谁能帮助我?首先十分感谢.

mik*_*ike 1

我没有安装 Atom,但我对 VS Code 做了类似的事情。您是否尝试过将命令开关放在引号内?

editor = 'atom -w'

我一直使用 Bash EDITORshell 变量来做到这一点,因为我的默认编辑器会根据我当时使用的操作系统而变化,无论我是否使用 SSH;因此,将其设置在项目的 Git 配置中对我来说不是一个解决方案。但这可能适合你。

所以请尝试一下并告诉我们会发生什么。