잿꽃's posting Garden

Git 오류 error: src refspec main does not match any 본문

WEB/GIT

Git 오류 error: src refspec main does not match any

잿꽃 2022. 4. 27. 17:15

내가 보려고 만드는 오류리스트

 

 

error: src refspec main does not match any

또 오류가 발생했다.

전에 했던 프로젝트에 주석을 달고 git push를 했으나 오류가 났다.

git사이트 환경에서 확인해보니 master와 main이 두 개 있었는데 master에 체크되어 있으면 master에서 master로 맞게 간 게 아닌가 싶지만... 요청이 거부되었다.

 

힌트를 보니

먼저 원격 변경 사항을 통합할 필요가 있어보입니다.

master에서 main으로 default값을 바꾸었다. push전 git pull을 먼저 진행하면 된다고 한다.

git pull origin main
git add -A
git commit -m "comments of cording"
git push origin main

순서대로 진행하니 매우 해결되었다...^^

 

 

 

 

 

출처 : [안드로이드][오류해결] fatal: The .. : 네이버블로그 (naver.com)

 

[안드로이드][오류해결] fatal: The current branch main has no upstream branch.

오류확인 평소와 같이 git 레포 생성 뒤, 안드로이드 연결을 하는데 문제가 생겼다. 검색하면 remote 삭제 ...

blog.naver.com

 

728x90
Comments