Wednesday, 15 September 2010

git - What is a convenient way of writing a multiline commit message? -


Instead of writing a short, 40-character Git commit message, I would like to write a longer, multiparted message.

As I understand, I need to add a new line after the message 'title'. How can I enter a new line in OS X Terminal or Win 8 CMD?

You think () that

  git commit -m "  

is the only way to make a commitment. -M The flag describes this type of:

-M msg> , - Message =
given in the given message If the multiple -m options are given, their values ​​are added as separate paragraphs.

< / Blockquote>

This flag lets you commit Allows to write sh inline ; it is convenient for a short time (i.e. usually a one-line) commits the message, but not much time. For multi-line commit messages , You should leave the -m flag and just run

  git commit  

This will cause your editor to pop up To write and commit your commitments more convenient to you than the command line Allows to form.

I refer you to more details.


No comments:

Post a Comment