[github] 맥북 계정명으로 push가 되었나요?

magnussapiens·2024년 6월 6일

참고자료

상황

  • 맥북에서 push를 하였을 때 로그인된 깃헙 계정이 아니라 맥북계정명으로 업데이트되는 현상

설명

  • Git config에는 3가지 영역이 있음
    - system, global, local
  • 만약 전체 config확인이 필요하면 아래와 같이 입력
	git config --list
	git config --list --system
	git config --list --global
	git config --list --local

해결

  1. global config에 이름과 이메일을 저장한다
  git config --global user.name "YOURNAME"
  git config --global user.email "your@email.com"
  1. 만약 특정 레포에만 적용하고자 할때는 local config에 이름과 이메일을 저장한다.
  git config --local user.name "YOURNAME"
  git config --local user.email "your@email.com"

0개의 댓글