In Bash/Zsh you can simply use literal line breaks inside quotes:
git commit -m 'Multi-line
commit
message'
ANSI-C quoting also works in Bash/Zsh:
git commit -m $'Multi-line\ncommit\nmessage'
You can also instruct Git to use an editor of your choice to edit the commit message. From the docs on git-commit:
The editor used to edit the commit log message will be chosen from the
GIT_EDITOR
environment variable, thecore.editor
configuration variable, theVISUAL
environment variable, or theEDITOR
environment variable (in that order). See git-var for details.
So to edit your message using nano
, for example, you can run:
export GIT_EDITOR=nano
git commit