escaping - Escape comment character (#) in git commit message -


this question has answer here:

i have set mcedit editor git commit messages. default ignores lines starting # character. odd may seem, need able have commit message looking this:

#foo-123: implement bar foo  committing work in progress 

the #foo-123: ... key + title of issue in our tracker. tracker can automatically pick these commit messages , add them issue.

unfortunately, first line gets treated comment , gets ignored.

i don't want have committing command line adding -m it's inconvenient/ugly when have multiple lines.

how work around this?

you can try , define different character comments in commit message:

git config core.commentchar <another char> 

as mention in "start git commit message hashmark (#)", setting available since git 1.8.2 (february 2013).

in case:

git config core.commentchar "*" 

note could in theory put core.commentchar word (multiple characters), git 2.0.x/2.1 stricter.

see commit 50b54fd nguyễn thái ngọc duy (pclouds):

config: strict on core.commentchar

we don't support comment strings (at least not yet). , multi-byte character encoding misinterpreted.

the test 2 commas updated because violates this. it's added patch introduces core.commentchar in eff80a9 (allow custom "comment char" - 2013-01-16). it's not clear me why behavior wanted.


poke mentions in comments change commit template:

when editing commit message, start editor contents in given file.
commit.template configuration variable used give option implicitly command.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -