오류해결

[git] src refspec mater does not match any, unable to read tree

wjxor 2021. 7. 18. 06:31
반응형

1. 해결과정

git commit을 하고 git push origin master를 하였는데

$ git push origin master
error: src refspec mater does not match any
error: failed to push some refs to 'https://github.com/~~~~~'

이렇게 에러발생

 

그리고 git status를 하였으나

$ git status
fatal: unable to read tree ~~~~~~~~~~~~~~

이런 에러 메시지 또 발생.....

 

그래서 구글링을 들어갔다.

 

검색어는 'error: src refspec main does not match any error: failed to push some refs to'

 

게시글중에 master 브랜치가 없어져서 생기는 문제라는 글을 보고

git add .
git commit -m "~~~~~~~~"
git push origin master

했더니 정상으로 이전에 올라가지 않았던 것까지 업로드가 되었다.

 

2. 참고한 링크

https://stratosphere.tistory.com/90

반응형