티스토리 뷰

728x90

* error: failed to push some refs to 'https://github.com/~~~'

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을 해주고 push를 이어서 해주면 된다!

 

그런데 fatal: refusing to merge unrelated histories라는 오류가 뜨면서 push가 안되는 경우가 간혹 있다.

이런 경우에는 

git pull seunga master --allow-unrelated-histories

를 통해 pull을 해주자!

 

git push seunga master

이후에 push를 해주면 깔끔하게 푸쉬 완료!

728x90
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함