Start a git commit message with a hashmark (#)
Posted
by knittl
on Stack Overflow
See other posts from Stack Overflow
or by knittl
Published on 2010-05-07T11:19:37Z
Indexed on
2010/05/07
11:28 UTC
Read the original article
Hit count: 288
Git treats lines starting with #
as comment lines when committing. this is very annoying when working with a ticket tracking system, and trying to write the ticket number at the beginning of the line, e.g.
#123 salt hashed passwords
git will simply remove the line from the commit message. is there any way to escape the hash? i tried \
and !
, but nothing works. whitespaces before #
are preserved, so they aren't a working solution to the problem either.
© Stack Overflow or respective owner