> ## Content Index
> Fetch the complete content index at: https://www.popit.kr/llms.txt
> Use this file to discover other available public pages before exploring further.

# [Tip] git commit 메시지에 #이슈번호 형태로 쓰기
- URL: https://www.popit.kr/git-commit-message-issue-number/
- Published: 2017-06-03T13:33:31.000Z
- Updated: 2017-06-03T13:33:31.000Z
- Author: 김형준
- Tags: #소프트웨어, git, commit, 이슈번호

git 사용시 commit 메시지에 "#<이슈번호>" 형태와 같이 사용하면 웹 화면 등에서 커밋로그 목록에서 자동으로 이슈에 링크를 걸어주는 서비스들이 많이 있습니다.

![git_issue_link](https://www.popit.kr/content/images/wp/2017/06/git_issue_link-600x51.png)

하지만 commit 로그를 vi 에디터를 이용하여 작성하는 경우 다음 화면과 같이 나타납니다.

![git_commit_vi](https://www.popit.kr/content/images/wp/2017/06/git_commit_vi-600x189.png)

여기서 #123 과 같이 입력하면 첫글자가 #(주석문자)로 시작하기 때문에 작성한 commit 로그가 저장되지 않습니다. 이럴때 흔히 다른 에디터를 사용하거나 "-m" 옵션을 이용하여 다음과 같이 명령행에서 commit 로그를 입력합니다.

> git commit -m "#123 This is issue title"

vi 에디터에서 commit 메시지에 #으로 시작하게 입력하는 방법은 다음 명령을 이용하여 comment char의 설정을 바꿔주면 됩니다.

> git config --global core.commentChar ';'

이렇게 하고 commit 하면 vi 에디터에는 다음과 같이 나타납니다.

![git_commit_vi2](https://www.popit.kr/content/images/wp/2017/06/git_commit_vi2-600x189.png)

이제 #으로 시작하는 commit 메시지를 작성해도 주석 처리 되지 않고 잘 반영되는 것을 확인할 수 있습니다.