본문 바로가기
Engineering/에러 해결 모음

[Error][Git] error: src refspec master does not match any

by Hyen4110 2023. 1. 17.
반응형

git add와 commit 후 push를 하려는데 아래와 같은 에러가 발생

error: src refspec master does not match any

push하는 사용자가 누구인지 정의가 되지 않아서 발생한 오류로 확인
아래와 같이하여 해결됨

  $ git config --global user.name hyen4110  
  $ git config --global user.email hyen4110@tistory.com

 

<총 정리>

 $ git init
 $ git add .  
 $ git commit -m "add faiss"  
 $ git config --global user.name hyen4110  
 $ git config --global user.email hyen4110@tistory.com 
 $ git push -u origin main
반응형

댓글