반응형

 

현회사 컨벤션 중 커밋 메세지에 #으로 시작하는 부분이 있는데,

git bash 에서 하려니 생략되어 버림.

왜냐하면 #을 주석으로 처리하기 때문인데..

 

 

git commit -a 를 하게 되면 아래처럼 자동으로 주석이 생긴다.

 

검색해보니 stack overflow 형님들이 알려주신다

https://stackoverflow.com/questions/2788092/start-a-git-commit-message-with-a-hashmark

 

Start a Git commit message with a hashmark (#)

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 li...

stackoverflow.com

 

결론적으로, 아래 명령어를 통해 주석 문자를 지정할 수 있고

git config core.commentChar ";"

 

아래처럼 자동 생성되는 주석에도 자연스럽게 반영되는걸 확인했다.

(근데 하이라이트는 왜 없어졌을까? 하이라이터에서 #을 인식하는듯하다. 다른 PC에서 했을땐 괜찮았는데;;)

 

반응형

'Programming' 카테고리의 다른 글

깃랩 이모지 gitlab emojis  (0) 2023.03.09
git push --set-upstream origin master 생략하기  (0) 2023.03.09

+ Recent posts