2

Possible Duplicates:
How can I set up an editor to work with Git on Windows?
Trouble on setting the git 'core.editor'

I'm trying to change my default git text editor to TextMate, such that forgetting the -m tag on a commit will bring me into TextMate and not vi. I have

[core]
editor = mate -w

in my ~/.gitconfig, but it still throws the following error at me:

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.

Fiddled around with various guides on how to set/unset the core editor, and couldn't really find anything that worked so I'm here for a pick-me-up.

Community
  • 1
  • 1
Nick Coelius
  • 4,288
  • 2
  • 20
  • 29
  • @karlphillip: TextMate is on Mac – CharlesB Jun 23 '11 at 19:29
  • what is the output of `git config core.editor`? – CharlesB Jun 23 '11 at 19:33
  • To close voters: referenced duplicates address different stuff, this question is about a specific error – CharlesB Jun 23 '11 at 19:34
  • Perhaps I should have been more clear: I tried all of the relevant threads I found on SO, and none of them worked. including the two that you linked above. `git config core.editor: TextMate.` running `mate` opens up TextMate, as it should...`mate -w` functions precisely as expected. I presume this is a simple routing problem, but since I'm not overly familiar with fixing such issues... – Nick Coelius Jun 23 '11 at 20:53
  • Furthermore: my ~/.bash_profile has: export EDITOR="/usr/bin/mate -w" – Nick Coelius Jun 23 '11 at 20:57

1 Answers1

4

See my answer in this question: Trouble on setting the git 'core.editor'


Since you already have $EDITOR set up correctly, just remove the entries from git:

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

now try a git commit again.

Community
  • 1
  • 1
X-Istence
  • 15,338
  • 6
  • 52
  • 73