Friday, January 23, 2015

Hash mark in git commit message

 From the git commit message:

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.

So, if you want to use a hash mark '#' in the commit message (E.g.: "#77 - fixed by changing user's permissions") use the following form of commit:

git commit --cleanup=whitespace

NOTE: don't forget to remove other unnecessary lines which start with '#' otherwise they will be added to the commit message as well