Programming/기타

[Git] git Error fatal: The current branch master has no upstream branch.To push the current branch and set the remote as upstream, use

뚜기짱 2023. 1. 9. 14:04

 

 

github Repository 생성후

$ git remote add origin Repository주소
$ git add . 
$ git commit -m "메시지" 
$ git push

아래 이미지와 같은 에러 메세지가 나왔다.

 

원인은 Repository 생성후 원격 저장소에 대한 기본 브랜치 설정을 안 해줬기 때문이다

처음 브랜치 설정만 해주면 해결이 가능

$ git push --set-upstream origin master

위 이미지에도 친절하게 설명이 나와있다

 

'Programming > 기타' 카테고리의 다른 글

OSI 7 Layer 개념정리  (0) 2023.04.04
맥에서 백틱 입력 방법  (0) 2023.02.13
git 명령어 모음  (0) 2023.02.01
ERROR E325: ATTENTION  (0) 2022.12.28