:bulb: 두 개의 Git 계정을 하나의 시스템에서 사용 시, 원하는 계정으로 Remote Repository에 작업을 수행하고자 할 때

[01] 설정 확인

전체 설정 확인

1
git config -l
  • 출력예시
    git-confing 확인-01

그림 1. git config -l 전체 설정 출력

특정 설정 확인(사용자 이름, 사용자 이메일)

1
2
git config user.name
git config user.email
  • 출력예시
    git-confing 확인-02

그림 2. user.name, user.email 개별 확인

[02] 설정 변경

사용자 계정 및 이메일 변경

1
2
git config --global user.name $(username)
git config --global user.email $(useremail)
  • 출력예시
    git-config 수정

그림 3. git config –global 으로 계정 변경 후 확인