트러블 슈팅

GIT PUSH 오류

5kiran 2022. 11. 17.
반응형

미니프로젝트 진행중 깃허브에 아래와 같은 오류가 뜨면push 가 되지 않았다

C:\Users\gitProject>git push origin master
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/userId/userProject.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.

 

아래와 같은 오류가 떴다
찾아보니 푸시전에 pull으로 먼저 병합해 줘야 한다고 했다
하지만 pull 을 해보니


refusing to merge unrelated histories


이라는 오류가 떴다


git pull origin 브랜치명 --allow-unrelated-histories


입력해주니 해결을 해준다

반응형

댓글