错误:有与编辑的交配-w“

问题描述:

我用这个命令来指定文本编辑器中的一个问题:错误:有与编辑的交配-w“

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

如何删除这个配置,我得到这个错误:

error: cannot run mate -w: No such file or directory

或者,我该如何解决这个错误呢?

谢谢。

+0

也许为默认编辑器设置另一个命令? – 2013-03-05 02:47:20

我假设你正在尝试使用TextMate作为默认编辑器。这个错误告诉你,'mate'是运行TextMate的命令行工具,不在路径上。

您必须将其添加到您的系统路径。首先你必须找到你的队友程序;这里的地方我的是:

[email protected] ~/Desktop/Programming/Minesweeper master$ which mate 
/usr/bin/mate 
[email protected] ~/Desktop/Programming/Minesweeper master$ ls -la /usr/bin/mate 
lrwxr-xr-x 1 root wheel 50 Mar 30 2009 /usr/bin/mate -> /Applications/TextMate.app/Contents/Resources/mate 

所以它在/Applications/TextMate.app/Contents

做一个simlink到/ usr/bin中/伴侣:

ln -s /Applications/TextMate.app/Contents/mate /usr/bin/mate 

现在当你输入的伴侣在命令行中,您应该启动一个新的TextMate实例。

您是否安装了队友壳:

尝试从终端

ln -s /Applications/TextMate.app/Contents/Resources/mate /usr/bin/mate

运行此作为其中存储此设置来看看全球的Git配置文件在:

~/.gitconfig