2

可能的重复:
如何设置编辑器以在 Windows 上使用 Git?
设置 git 'core.editor' 时遇到问题

我正在尝试将我的默认 git 文本编辑器更改为 TextMate,这样在提交时忘记 -m 标签会将我带入 TextMate 而不是 vi。我有

[core]
editor = mate -w

在我的 ~/.gitconfig 中,但它仍然向我抛出以下错误:

error: cannot run TextMate: No such file or directory
error: There was a problem with the editor 'TextMate'.
Please supply the message using either -m or -F option.

摆弄了有关如何设置/取消设置核心编辑器的各种指南,但实际上找不到任何有用的东西,所以我来这里是为了提神。

4

1 回答 1

4

请参阅我在此问题中的回答:设置 git 'core.editor' 时遇到问题


由于您已经$EDITOR正确设置,只需从 git 中删除条目:

git config --global --unset-all core.editor

现在再次尝试 git commit。

于 2011-06-23T19:28:14.130 回答