honey_pot

[Git] 깃허브 push 시 error : src refspec master does not match any 에러 본문

error 모음집

[Git] 깃허브 push 시 error : src refspec master does not match any 에러

_tera_ 2021. 5. 27. 15:46

error: src refspec master does not match any

error: failed to push some refs to 'https://github.com/repo.....(중략)'

 

깃허브에서 pull 없이 push할 경우 기존 내용을 삭제하거나 하는 문제가 생길 수 있기 때문에, 이런 문제를 피하고자 에러 메세지를 발생시킨다고 한다.

 

-> 새로운 깃 repository를 init하고 push한다

 

git init

git add .

git commit -m "init git" 

 

--장고걸스 설명

git config user.name "Username"

git config user.email "Email address"

git remote add origin "github.com/your-repo.git"

--

 


 

 

난 git push -u origin master 명령하니 이렇게 뜬다

 

 

github repo 확인해보니 제대로 커밋되어있다.

 

Comments