본문 바로가기
etc

[Git] error: pathspec 'main' did not match any file(s) known to git 해결법

by saoh 2022. 3. 17.

master 브랜치를 main 브랜치로 변경하려고 했는데 해당 에러가 발생했다.

 

 

아래 명령을 순서대로 입력하면 해결 된다.

git remote update

git fetch

git checkout main