Git 编辑器变为异步?

Git editor goes asynchronous?

我在 git 中将 textmate 设置为我的编辑器:

$ git config --list --global | grep editor
core.editor=mate

当我执行如下命令时:

$ git commit --amend 

$ git rebase -i <hash>

编辑器按预期打开,但它似乎是异步打开的,因为当我回头查看命令提示符时,我看到了这个:

[mybranch 099f0ea] My new changes
 Date: Tue Jan 28 19:11:52 2020 -0800
 3 files changed, 5 insertions(+), 9 deletions(-)

即使我没有在我的编辑器中保存对文件的任何更改,这些更改似乎已经提交。此外,在编辑器中保存对文件的任何更改都没有效果。几乎就像编辑器是异步打开的一样。

知道为什么会这样吗?

在终端中,说:

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

(来源:https://help.github.com/en/github/using-git/associating-text-editors-with-git