프로그래밍
GitHub: Make sure you configure your 'user.name' and 'user.email' in git.
toeun
2021. 1. 31. 22:57
React 사이드 프로젝트 셋팅하는데에..
몇가지 js 파일들을 생성하고 여느때와 같이 git에 first commit 하려는데 이런 alert창이 떴다.
구글링해보니, 하기 명령어를 수행해서 user.name과 user.email을 등록하라고 한다.
git에 대한 설정정보를 작성하는 것 같았다.
git config --global user.name '유저쩜네임'
git config --global user.email '유저@쩜.이메일'
그리고 first commit이 잘 됐다!
그런데.. 하던대로 내 origin에 push 하려는데 잘 안됐다!
git remote add origin https://gitHub.com/you/youre-repository
git push -u origin master
알고보니.. 내 GitHub에서 master 브랜치가 아닌 main 브랜치 default 브랜치로 설정되어 있던 것..
default 브랜치를 master로 변경하니 push한 소스들을 잘 볼수 있었다. ;-)