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


I am using Git from the command line and am trying to add a line break to the commit message (using git commit -m "") without going into Vim.

Is this possible?


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

goes here EOF

How do I do a 'git status' so it doesn't display untracked files without using .gitignore?

How to list only the names of files that changed between two commits