Multi-paragraph Git commit messages from the command line

By on

To write a multi-paragraph Git commit message from the command line, use the --message or -m option multiple times:

git commit -m "Subject" -m "First paragraph" -m "Second paragraph"

The first message is the subject line, and every subsequent one becomes a paragraph:

git log
commit 3c2a65bd0e77bc323b77463ced0feb7c02f3acac
Author: Alice <alice@example.com>
Date:   Sat Jul 17 13:05:58 2021 +0200

    Subject

    First paragraph

    Second paragraph