본문 바로가기

git, github

브랜치 강제병합

같은 브랜치에서 작업하거나, 같은 레포에서 작업했음에도 관계 없는 저장소라 pull, push, merge가 안될 수 있다.

README를 작성하면 일어날 수 있는 일이다.

 

A<-B 브랜치로 강제로 병합하는 방법.

git merge --allow-unrelated-histories B

merge 위치에 pull을 넣으면 강제로 pull 할 수 있다.

 

왜 README를 작성하면 이런 일이 발생하는지 설명해놓은 블로그다.

 

git push, pull (fatal: refusing to merge unrelated histories) 에러

원격 저장소를 remote로 설정하고 바로 push를 하면 몇가지 오류가 발생할 수도 있다.예를 들어 아래와 같은 오류 메시지이다.12 ! [rejected] master -> master (non-fast-forward)error: failed to push some refs to 'https:

jobc.tistory.com