GitHub (probably, wrongly) uses #
\'s when referring to GitHub issues. So I would like to add a commit message that refers to the issue on the first line.
Git allows you to update the comment char from the #
symbol to any other. Then you can use the #
symbol.
e.g.
git config core.commentChar '>'
or optionally set it globally
git config --global core.commentchar '>'
The simplest way to avoid git
interpreting the issue number as a comment line, is to insert another character before, so the #
is not the leading character of the line (a space will do the trick).
Here is an example:
#45
will be seen as a comment
#45
Issue #45
will both be taken entirely as commit messages