728x90
Git에 팀원들끼지 push를 많이 하다 보니 아래와 같은 오류가 발생했다.
$ git push origin master
To https://github.com/eundol0519/cloneCodingProject.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/eundol0519/cloneCodingProject.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
error: src refspec mater does not match any
error: failed to push some refs to 'https://github.com/eundol0519/cloneCodingProject.git'
이 오류의 원인은 깃의 원격 저장소와 현재 로컬 저장소가 동기화 되어 있지 않기 때문이다. 동기화 시켜주면 간단하게 해결 할 수 있다. 그래서 내가 해결한 방법은 git pull을 해서 동기화 시켜 준 후 git push origin master 해줬다.
git pull origin master or git pull
(참고한 사이트)
git 기본 명령어, failed to push some refs to에 대한 해결방법
git에 대한 기본적인 명령어와 흐름을 알아보자. 1. 로컬 저장소 만들기 - 파일들을 버전 관리할 장소(폴더)를 정한다. - 그 안에서 'git init'이라고 명령어를 친다. - 이상한 폴더, 파일들이 만들어
dh-dh.tistory.com
728x90
'🧠 지식창고 > 에러' 카테고리의 다른 글
[Error] api 요청 시 200, 204 뜨는 이유 (0) | 2022.01.13 |
---|---|
[Error] npm install 설치 시 npm ERR! code ERESOLVE 오류 (0) | 2021.12.24 |
[Error] the slice reducer for key "feed" returned undefined. 에러 (0) | 2021.12.09 |
[Error] doc 사용 시 n.indexOf is not a function 에러 (0) | 2021.12.01 |
[Error] firebase.js import 에러 발생 (0) | 2021.12.01 |
댓글