본문 바로가기

카테고리 없음

[GitHub] src refspec master does not match any 해결 방법

반응형

0. remote 확인

git remote -v

 

 

 

1. remote 변경 (src refspec master does not match any 에러 발생시 해결 방법)

1) 기존 origin 제거 (기존에 연결된 원격 저장소가 있다면. 0번의 git remote -v 하면 확인 가능.)

git remote remove origin

2) git init

git init

 

3) 새 origin 추가

git remote add origin https://github.com/계정/저장소주소.git

4) add, commit, push

git add .
git commit -m "commit message"
git push origin main

 

 

728x90
반응형