You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Regina Henschel <rb...@t-online.de> on 2014/10/26 17:37:10 UTC

How to make a multi-line commit message with git?

Hi all,

I still fail to write multi-line commit messages. When I use
git commit -a --amend -m ???
What do I have to write for ??? for to get

#i123456 Title of the issue
Patch by: an author


Is #i123456 the right syntax to automatically generate a post to the issue?

Kind regards
Regina

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: How to make a multi-line commit message with git?

Posted by Regina Henschel <rb...@t-online.de>.
Hi Ariel,

Ariel Constenla-Haile schrieb:
> Hello Regina,
>
> On Wed, Oct 29, 2014 at 07:30:53PM +0100, Regina Henschel wrote:
>> Hi Andrea,
>>
>> is it the same for git?
>>
>> @Ariel: Aren't you using git? How do you make multi-line commit messages?
>
> Yes. You can use the editor if you omit the --message="..." option, or
> use that option and press Enter before closing the quotation:
>
> git commit --amend --message="This is a commit message[press Enter here]
>> [Press Enter here]
>> This is the third line. [Press Enter here]
>> This is the fourth line." [<---- close the message quotation and press Enter]

I think, I have understand it now.

>
> Test all this with a dummy testing repository:
>
> cd ~/
> git init testrepo
> cd testrepo
> touch test.txt
> git add test.txt
>
> and then try commiting and editing the commit message, then look at the
> log with git log.

That is a very useful tip and helps me a lot. I would have never thought 
of using such dummy testing repository.

It is worth to collect all this tips for beginners in the Wiki, but I 
don't know, when I will have time to write it.

Kind regards
Regina

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: How to make a multi-line commit message with git?

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hello Regina,

On Wed, Oct 29, 2014 at 07:30:53PM +0100, Regina Henschel wrote:
> Hi Andrea,
> 
> is it the same for git?
> 
> @Ariel: Aren't you using git? How do you make multi-line commit messages?

Yes. You can use the editor if you omit the --message="..." option, or
use that option and press Enter before closing the quotation:

git commit --amend --message="This is a commit message[press Enter here]
> [Press Enter here]
> This is the third line. [Press Enter here]
> This is the fourth line." [<---- close the message quotation and press Enter]

Test all this with a dummy testing repository:

cd ~/
git init testrepo
cd testrepo
touch test.txt
git add test.txt

and then try commiting and editing the commit message, then look at the
log with git log.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: How to make a multi-line commit message with git?

Posted by Regina Henschel <rb...@t-online.de>.
Hi Andrea,

is it the same for git?

@Ariel: Aren't you using git? How do you make multi-line commit messages?

Kind regards
Regina

Andrea Pescetti schrieb:
> Regina Henschel wrote:
>> I still fail to write multi-line commit messages. When I use
>> git commit -a --amend -m ???
>> What do I have to write for ??? for to get
>> #i123456 Title of the issue
>> Patch by: an author
>
> If you leave the -m out, the editor is started and you can write your
> message there. Otherwise, I usually simply type the newline (i.e., I
> press Enter to break the line):
> $ git commit [options] -m "#i123456# Title of the issue
>  > Patch-by: Full Name <em...@example.org>"
>
>> Is #i123456 the right syntax to automatically generate a post to the
>> issue?
>
> As far as I know, "#i123456#" is the best syntax. It does work with our
> Bugzilla bots, even though other conventions work too. I updated
> http://openoffice.apache.org/svn-basics.html
> accordingly, as discussed here with Kay a few days ago.
>
> Regards,
>    Andrea.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: How to make a multi-line commit message with git?

Posted by Andrea Pescetti <pe...@apache.org>.
Regina Henschel wrote:
> I still fail to write multi-line commit messages. When I use
> git commit -a --amend -m ???
> What do I have to write for ??? for to get
> #i123456 Title of the issue
> Patch by: an author

If you leave the -m out, the editor is started and you can write your 
message there. Otherwise, I usually simply type the newline (i.e., I 
press Enter to break the line):
$ git commit [options] -m "#i123456# Title of the issue
 > Patch-by: Full Name <em...@example.org>"

> Is #i123456 the right syntax to automatically generate a post to the issue?

As far as I know, "#i123456#" is the best syntax. It does work with our 
Bugzilla bots, even though other conventions work too. I updated
http://openoffice.apache.org/svn-basics.html
accordingly, as discussed here with Kay a few days ago.

Regards,
   Andrea.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org