Rego의 블로그

error: src refspec master does not match any error: failed to push some refs to 오류 해결 본문

사소한 오류

error: src refspec master does not match any error: failed to push some refs to 오류 해결

RegularPark 2022. 1. 26. 09:36

오류 문구

다음에 또 당하지 않기 위해쓰는 글 #1.

 

오늘 생성한 Repository에 로컬 파일을 업로드하려고 했는데, 짜잔! 처음 보는 에러.

 

경고 문구에 master가 있는 걸 보고 branch가 잘못 설정되었나보다 짐작했다.

 

잠시 구글링을 해보니 역시나 branch 문제였고 터미널에

 

git checkout -b 'master'

요거 입력해주면 branch가 'master'로 변경되었다고 알려준다.

 

git push origin master

그 다음은 늘 하던 대로 푸쉬하면 된다.