--cleanup=<mode>
This option determines how the supplied commit message should be cleaned up before committing. The <mode> can be strip, whitespace, verbatim, scissors or default.
strip
Strip leading and trailing empty lines, trailing whitespace, commentary and collapse consecutive empty lines.
whitespace
Same as strip except #commentary is not removed.
verbatim
Do not change the message at all.
scissors
Same as whitespace except that everything from (and including) the line found below is truncated, if the message is to be edited. "#" can be customized with core.commentChar.
# ------------------------ >8 ------------------------
default
Same as strip if the message is to be edited. Otherwise whitespace.
The default can be changed by the commit.cleanup configuration variable (see git-config(1)).
Quote from man git-commit: