TextMate for Git Commit Messages
I prefer VIM for use with Git commands that require an editor (such as the commit message for git commit). However, if you'd prefer to use TextMate you can do the following:
$ echo "GIT_EDITOR=\"mate -w\"" >> ~/.bash_login $ source ~/.bash_login
That assumes that the mate command is installed and findable in your PATH. For more info, in TextMate select the Help -> Terminal Usage... menu item.
The EDITOR environment variable is used by many applications (including git) that need the help of an editor. If you'd prefer to specify that TextMate be used with any such application, specify EDITOR instead:
$ echo "EDITOR="mate -w"" >> ~/.bash_login
Original Comments:
"That's a good point, Duncan. I've updated the article to first recommend using the git-specific environment variable. Thanks! " -Galen O'Hanlon
"Probably better to use the git-specific environment variable GIT_EDITOR, rather than EDITOR. The git-commit documentation discusses the various ways the editor can be specified. http://www.kernel.org/pub/software/scm/git/docs/git-commit.html"
-Duncan Beevers
