기타

[Git] error: src refspec master does not match any

야챔 2021. 6. 14. 22:51

push 를 하면 저렇게 에러가 뜬다.

 

구글링을 해보니

git init

git add .

git commit -m "start"

git push origin { } 를 하면 된다던데

 

계속 저 상태가 반속됨

 

왜일까 계속 구글링 하다가 어느 블로그를 보았었는데

넣을려는 브랜치 .git/refs/heads에 main 밖에 없었음

 

git 에는 master 브랜치가 있었고

 

브랜치가 서로 달라서 벌어진 현상인듯

 

git remote update 하여 master 브랜치 가지고옴

 

 

아마..

 

 

 

 

참고

https://cjh5414.github.io/get-git-remote-branch/

https://develoger.kr/error-src-refspec-main-does-not-match-any/