@dev park 박예빈
last update: 2020.12.21.
CONTENTS
Message 'src refspec master does not match any' when pushing commits in Git
Message 'src refspec master does not match any' when pushing commits in Git
Github에 새로운 Repository를 생성하고 초기화 후 첫 commit 및 push를 날릴 때, Terminal에서 src refspec main does not match any
라는 에러 메세지가 도출되는 문제의 디버깅에 대해 기술한다.
git Repository를 생성하면 화면에 다음과 같은 command line을 입력하라는 내용이 보인다:
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin <https://github.com/foo/bar.git>
git push -u origin main
위의 내용을 VS Code의 Terminal에 입력하고, git push -u origin main
를 입력할 때 src refspec main does not match any
라는 에러 메세지가 확인되며, push가 진행되지 않는다.