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.

5
  • @karlphillip: TextMate is on Mac Commented Jun 23, 2011 at 19:29
  • what is the output of git config core.editor? Commented Jun 23, 2011 at 19:33
  • To close voters: referenced duplicates address different stuff, this question is about a specific error Commented Jun 23, 2011 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... Commented Jun 23, 2011 at 20:53
  • Furthermore: my ~/.bash_profile has: export EDITOR="/usr/bin/mate -w" Commented Jun 23, 2011 at 20:57

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

4 Comments

This should be a comment, not an answer.
See above comment for my clarifications.
@Nick Coelius: Try the command I have added above, just unset core.editor entirely since you have $EDITOR set.
That worked, thanks. I could've sworn I'd tried, and failed, to do that before, but I guess not.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.