개발 일기

Git push가 제대로 작동하지 않을 경우 !? 본문

Client/안드로이드

Git push가 제대로 작동하지 않을 경우 !?

이건욱

git push를 했을 경우 정상적으로 작동을 하지 않고

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

이런 오류가 뜨는 경우가 있다.

 

push 전에 먼저 pull을 해서 프로젝트를 병합을 해줘야 한다.

 

프로젝트 병합시

 

fatal: refusing to merge unrelated histories

 

이런 문구가 뜨면 

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

-allow-unrelated-histories 옵션을 통해 해결이 가능하다.

 

이 옵션은 서로 관련 기록이 없는 두 프로젝트를 병합을 했을 때 기본적으로 git 이 내용을 거부하므로 이것을 허용해주는 옵션이다.

'Client > 안드로이드' 카테고리의 다른 글

ImageView 란?  (0) 2020.03.14
Retrofit 이란?  (0) 2020.03.13
View ?  (0) 2020.03.11
Edit Text ?  (0) 2020.03.10
TextView ?  (0) 2020.03.09
Comments