개인 프로젝트를 하는데 회사 계정과 다른 이름을 사용하고 싶다!
Target : global 는 회사계정으로, 개인 프로젝트에서는 개인 이메일로.
Global 설정 변경하기
현재 설정되어 있는 계정 확인하기 (--global 없어도 됨)
> git config --global user.name
> git config --global user.email
글로벌 설정 변경하기
> git config --global user.name '예슬'
> git config --global user.email 'yeseul111@email.com'
글로벌 셋팅은 gitconfig 파일에서도 확인 가능
> vi ~/.gitconfig
특정 프로젝트의 설정만 변경하기 (Local 설정변경)
현재 설정 확인 (디폴트로 global설정이 나옴)
> cd {변경하고자 하는 프로젝트 경로}
> git config --local user.name
> git config --local user.email
로컬 설정 변경하기
> git config --global user.name 'yeseul'
> git config --global user.email 'yeseul222@email.com'
변경 전/후 Author 이름 변경
(test commit : local설정 변경 전, test22 commit : local설정 변경 후)
'Tool-Setting' 카테고리의 다른 글
git remote 연결 끊기(Commit History 삭제, 미삭제) (0) | 2021.05.26 |
---|---|
cmd 이용해서 git add/commit/push하기 (0) | 2021.02.02 |
댓글