정리/Git hub

fatal: refusing to merge unrelated histories 해결법

2744m 2019. 4. 25. 16:23

pull 명령시 

fatal: refusing to merge unrelated histories

이라는 문구가 나오면서 진행이 되지 않는다면

 

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

이 명령어로 pull을 해보자

 

저런 오류가 발생하는 이유는,

 git에서는 서로 관련 기록이 없는 이질적인 두 프로젝트를 병합할 때 기본적으로 거부하기 때문이라고 한다.

--allow-unrelated-histories

명령을 통해 이질적인 두 프로젝트를 병합할 수 있게 허락해주는 것이다.

 

출처https://gdtbgl93.tistory.com/m/63?category=774133