TextMate for Git Commit Messages
Posted on April 25th, 2008 by gohanlon | Filed in git
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