Add line break to 'git commit -m' from the command line

The Solution to Add line break to 'git commit -m' from the command line is


Certainly, how it's done depends on your shell. In Bash, you can use single quotes around the message and can just leave the quote open, which will make Bash prompt for another line, until you close the quote. Like this:

git commit -m 'Message

goes
here'

Alternatively, you can use a "here document" (also known as heredoc):

git commit -F- <<EOF
Message

goes
here
EOF

~ Answered on 2011-02-21 10:12:01


Most Viewed Questions: