VS Code에서 github 업로드 중 에러가 발생했다
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/주소.git'
git push origin master
해당 명령어에서 master를 찾을 수 없는 것 같았다
* 해결 방법 *
깃 브랜치를 확인해본다
git branch

git push origin main

* git branch master 변경(선택) *
해도 되고 안해도 되지만 관리를 위해 git branch를 master로 변경해보기로 했다
git branch -M master

이제 origin master로 푸시할 수 있다
git push origin master
'개발 기록 > git' 카테고리의 다른 글
| Cursor에서 Github에 Push하는 방법 (초보자용 단계 정리) (1) | 2026.02.13 |
|---|---|
| [VS Code] github 소스 가져오기 (2) | 2024.11.15 |
| VsCode에서 Github 업로드하는 방법(initialize repository 안 뜸) (2) | 2024.10.31 |
| git bash로 github에 프로젝트 업로드하기 (1) | 2023.12.14 |