Error zip

[Github] Git에 올리려고 하는데 자꾸 reject 당함 이슈 ... hint: Updates were rejected because the tip of your current branch is behind its remote counterpart. Integrate the remote changes (e.g. .....

JANNNNNN 2024. 7. 4. 16:56

에러 메시지

 ! [rejected]        main -> main (non-fast-forward)
error: failed to push some refs to 'https://github.com/~~~.git'
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.

 

인텔리제이에서 Git에 push 하려고 하는데 위와 같은 에러메시지를 마주했다 ..

약 30분가량의 서칭 결과 (다른 시도도 해봤는데 다 안됨 ㅠㅠ)

 

해결책

$ git pull origin main --rebase


From https://github.com/~~/~~.git
 * branch            main       -> FETCH_HEAD
Successfully rebased and updated refs/heads/main.

해당 resource 파일 경로에서 git bash를 키고 위 명령어를 입력합니다!

Done
16:51:17.683: [ToothDay] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/main:main

정상적으로 업로드 됨!

 

추가적으로 ..🫠

나만 그런건진 모르겠는데 git에서 read.me 파일을 자동생성하기 누르면 자꾸 push할 때 에러가 나는 것 같다 🥲