git commit -m "#message"
Commands such as commit and tag that let you edit
messages consider a line that begins with this character commented,
and removes them after the editor returns (default #).
If set to "auto", git-commit would select a character that is not the
beginning character of any line in existing commit messages.
git config --global core.commentChar auto
git add foo
git commit -m '#message'
git add bar
git commit # opens editor, And I see:
# Please enter the commit message // Wrong! This should not use the # char.
From some tests in the git repo it only applies this "auto" methodology if the message it is "commenting" about already contains a comment character. The existing commit messages in the docs refer to (in this case) the amended message (or in the case of a rebase-squash the several commit messages).
It looks at the current buffer that is about to be displayed and picks the first of
"#;@!$%^&|:" as potential comment characters and otherwise errors.