Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

textmate does not save commit message

I'm installing git on a new Mac mini with textmate2 and git 1.8.3.2. It works quite fine, but when I use gca (git commit -v -a) it doesn't act as before. It opens textmate2 so I can type my commit message, but when I save and close it doesn't jump back to terminal as before. Terminal shows the error

Aborting commit due to empty commit message.

Anybody have an idea what's wrong? Thanks in advance.

like image 832
user2550697 Avatar asked Jul 05 '26 11:07

user2550697


1 Answers

This happens, if the environment variables $EDITOR and/or $VISUAL are not set correctly. You need to add the -w flag to mate, otherwise git does not wait for Textmate to close the file and assumes your message is ready the moment your editor opens - before you even start typing.

Wrong:

export EDITOR="/usr/local/bin/mate"

Right:

export EDITOR="/usr/local/bin/mate -w"

like image 94
kwood Avatar answered Jul 07 '26 02:07

kwood



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!