tags:

views:

17

answers:

3

I used this command to specify the text editor:

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

How can I remove this configuration as I'm getting this error:

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

Or, how can I fix this error instead?

Thanks.

A: 

I assume you're trying to use TextMate as your default editor. This error is telling you that 'mate', the command line tool to run TextMate, is not on the path.

You must add it to your system path. First you must locate your mate program; here's where mine is:

Nick@Macintosh-3 ~/Desktop/Programming/Minesweeper master$ which mate
/usr/bin/mate
Nick@Macintosh-3 ~/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

So it's in /Applications/TextMate.app/Contents

Make a simlink to /usr/bin/mate:

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

Now when you type mate at the command line, you should launch a new TextMate instance.

I82Much
A: 

Have you installed the mate shell:

Try running this from the Terminal

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

As for where this setting is stored have a look at the global Git config file at:

~/.gitconfig

Abizern
A: 

Thanks a lot everyone.

I tried the solution here and worked just fine: http://www.ruby-forum.com/topic/214340#new

SWEngineer