git config

oh·2021년 2월 14일
1

GIT

목록 보기
2/2

git config

git config --list

  • git 설정 보기
  • 각 설정 파일에 중복된 설정이 있으면 순서대로 덮어쓴다.
git config --global --list
git config --list

user.name, user.email

git config --global user.name "test name"
git config --global user.email test@exmaple.com

core.editor (편집기)

  • 커밋할 할 때 나 tag 메시지를 편집할 때 사용할 편집기 설정
git config --global core.editor <target>
git config --global core.editor vim

commit.template

  • 커밋 메시지 규칙이 있으면 그 규칙에 맞는 템플릿 파일을 만들고 시스템 설정
git config commit.template <target>
git config commit.template ~/.gitmessage.txt
  • 커밋 템플릿 설정 해지
git config --unset commit.template

core.pager

  • log 나 diff 메시지를 출력할 때 페이지를 나누어 보여준다.
git config core.pager less
git config core.pager more
  • 페이지를 나누고싶지 않고 한번에 보고 싶다면
git config core.pager ''
profile
hi~

0개의 댓글