-
error: failed to push some refs to ! [rejected] gitError Handling/에러핸들링 2023. 7. 7. 17:44
Github에는 있는데, 내 로컬에는 없는 파일이 있을때 내 파일을 push하면 발생하는 오류이다. 이럴땐 pull을 먼저 하고 나서 push를 해야 한다.
1. git add .
2. git commit -m 'message'
3. git pull origin main // 먼저 갖고오기.
4. gir push origin main
To @githup repositoty 주소 ! [rejected] main -> main (non-fast-forward) error: failed to push some refs to '@githup repositoty 주소' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
'Error Handling > 에러핸들링' 카테고리의 다른 글
경로 연동 에러 (디렉토리 구조 문제) (0) 2023.07.13 git MERGING issue (0) 2023.07.12 MongooseServerSelectionError: connect ECONNREFUSED ::1:27017 몽고디비 연결 에러 (0) 2023.07.07 SyntaxError: Unexpected string in JSON at position 23, at JSON.parse (<anonymous>) (0) 2023.07.06 EagerLoadingError [SequelizeEagerLoadingError]: PostLikes is not associated to Posts! (0) 2023.07.06