threads / discuss / 18583

Problem Creating Commit Messages

Subject: Problem Creating Commit Messages

## tl;dr

4 messages between Mar 27, 2009 and Mar 27, 2009.

replies: 3people: 4as markdown or json

bggy· Mar 27, 2009, 04:44 UTC · lore

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

-- 
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.
Geoffrey Lee· Mar 27, 2009, 05:18 UTC · re: bggy · lore

Re: Problem Creating Commit Messages

On Thu, Mar 26, 2009 at 9:44 PM, bggy <balishaggy@yahoo.com> wrote:
> 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
John Tapsell· Mar 27, 2009, 06:08 UTC · re: bggy · lore

Re: Problem Creating Commit Messages

2009/3/27 bggy <balishaggy@yahoo.com>:
Show 5 quoted 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".
> 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
Jonas Flodén· Mar 27, 2009, 07:56 UTC · re: bggy · lore

Re: Problem Creating Commit Messages

bggy wrote:
Show 9 quoted 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.
> 
> 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

← back to recent threads