git 최초 사용자 설정

  • git에서 커밋을하거나 작업할 때 Author 정보에 표시될 이름 정보
  • 최초 사용자 설정을 해야지 commit을 진행할 수 있다.
  • 터미널에 다음과 같이 입력한다.
$ git config --global user.name "Your Name"
$ git config --global user.email Username@example.com
  • config에 내용이 추가된 것을 볼 수 있다.
$ cat ~/.gitconfig 
[user]
    name = Your Name
    email = Username@example.com
  • 잘못 저장했다면 다음 명령어로 삭제할 수 있다.
# 전역 설정을 삭제
$ git config --global --unset user.name
$ git config --global --unset user.email

# 개별 저장소의 설정을 삭제
$ git config --unset user.name
$ git config --unset user.email
profile
나 응애👶 개발자, 딥린이👨‍💻, 언어 연구자 👨‍🎓

0개의 댓글