window 환경에서 개발하기/Git
[Git config] 글로벌 설정 & 로컬 설정
miracle21
2024. 12. 10. 11:29
반응형
Git은 로컬 설정을 우선 적용하며, 로컬 설정이 없을 경우 글로벌 설정을 사용함.
글로벌 계정 설정 (기본 계정 고정)
git config --global user.name "GlobalUserName"
git config --global user.email "global@example.com"
로컬 계정 설정 (프로젝트별 계정 지정)
해당 프로젝트 디렉토리에서 실행
git config user.name "LocalUserName"
git config user.email "local@example.com"
확인
글로벌 설정 확인:
git config --global --list
로컬 설정 확인:
git config --local --list
반응형