IT 노트/Git

[Git] gitconfig설정

czecze 2021. 9. 23. 19:51

메인설정(global)

$ git config --global user.name "이름"
$ git config --global user.email "메일주소"

위에와 같이 설정을 하게 되면 ~/.gitconfig 에 아래와 같이 설정이 들어가게 된다

# This is Git's per-user configuration file.
[user]
	name = 이름
	email = 메일주소

서브설정

회사프로젝트랑 개인프로젝트로 설정을 변경하는 경우

$ cd ../프로젝트path/
$ git config --local user.name "이름"
$ git config --local user.email "주소"


※프로젝트리포지토리안에 있는 ./.git/config에 설정내용이 들어가게 됨

설정확인

$ git config -l
반응형