2011-06-23 28 views
1

可能重复:
How can I set up an editor to work with Git on Windows?
Trouble on setting the git 'core.editor'小Git的问题 - 更改默认编辑

我想改变我的默认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. 

关于如何设置/取消的核心编辑器,couldn各种指南拨弄左右真的找不到任何有用的东西,所以我来这里接我。

+0

@karlphillip:TextMate在Mac上 – CharlesB

+0

'git config core.editor'的输出是什么? – CharlesB

+0

要关闭选民:引用的重复地址不同的东西,这个问题是关于一个具体的错误 – CharlesB

回答

4

见我的回答这样一个问题:Trouble on setting the git 'core.editor'


既然你已经有$EDITOR设置正确,只是从混帐删除条目:

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

现在尝试git的再犯。

+2

这应该做个评论,而不是回答。 – karlphillip

+0

有关我的说明,请参阅上述评论。 –

+0

@Nick Coelius:试试我上面添加的命令,因为你已经设置了'$ EDITOR',所以完全取消设置core.editor。 –