system, global, local 설정 파일들이 관리하는 설정의 범위가 다르다는 점을 이용하면**"--local
이나 -global
을 이용하여 commit message template이 적용되는 범위를 설정할 수 있다."**
--local
: 프로젝트 별로 gitcommitmessage 등록--global
: git을 사용하는 프로젝트 전체에 gitcommitmessage 등록2가지 예시를 통해 어떻게 이를 활용할 수 있을지 알아보자.
-global
옵션을 이용하면 해당 사용자가 사용하는 모든 저장소(repository)에서 동일한 commti message template를 적용할 수 있다.# 명령어 형식
git config --global commit.template {사용할 .gitmessage.txt 파일 경로}
# 명령어 예시
git config --global commit.template ~/.gitmessage.txt
-local
옵션을 이용하면 해당 저장소에서만 commit message template을 적용시킬 수 있다.-local
옵션으로 각각의 commit messsage template을 지정할 수 있다.