Skip to contentSkip to conversation

Problem Creating Commit Messages

DISCUSSION bggy 4 participants 4 messages Jun 15, 2016

lore
Share & tools
lore

bggy

author
#0 lore raw

Hello, I'm new to git and I haven't been able to create commit messages in either vim or textmate(changed core.editor to mate). I can create commit messages when I use the -m option, but I like creating multiple-line messages and it's easier to do it with a fresh line-break in the terminal.

Using textmate I saved and closed the textmate file that pops up after $git commit -a, but git responds that the commit was terminated due to an empty message.

I am not familiar with VIM, can change modes, but none of the key combos I tried worked.

Thank you!,
John

Signature · 2 lines
View this message in context: http://www.nabble.com/Problem-Creating-Commit-Messages-tp22735968p22735968.html
Sent from the git mailing list archive at Nabble.com.
#1 lore raw

2009/3/27 bggy <[email protected]>:

Quoted 5 lines

Hello, I'm new to git and I haven't been able to create commit messages in either vim or textmate(changed core.editor to mate).  I can create commit messages when I use the -m option, but I like creating multiple-line messages and it's easier to do it with a fresh line-break in the terminal.

You could use a simple text editor like "joe".

Quoted 3 lines

Using textmate I saved and closed the textmate file that pops up after $git commit -a, but git responds that the commit was terminated due to an empty message.

Sometimes graphical editors return on the command line before they actually quit. This might be what is happening here. If so, you could file a bug against textmate.

John

#2 lore raw
In reply to bggy
Quoted 2 lines · bggy

I am not familiar with VIM, can change modes, but none of the key combos I tried worked.

1) Press "i" to enter Insert mode
2) Type in some text on the first line
3) Press "esc" to leave Insert mode
4) Press Shift + ; (or in other words, the colon character)
5) Enter the characters "wq" without the quotes, and press Enter. ("w" for write, "q" for quit)

-Geoffrey Lee

#3 lore raw
In reply to bggy
Quoted 9 lines · bggy

Hello, I'm new to git and I haven't been able to create commit messages in either vim or textmate(changed core.editor to mate). I can create commit messages when I use the -m option, but I like creating multiple-line messages and it's easier to do it with a fresh line-break in the terminal.

Using textmate I saved and closed the textmate file that pops up after $git commit -a, but git responds that the commit was terminated due to an empty message.

Hi there,
For TextMate to work with Git you need to add the option -w to "mate" which will specify that it should wait for the file to be closed.

So set EDITOR="mate -w" and it should work with TextMate.

With regards,
Jonas