etc/git hub
[error] refusing to merge unrelated histories
윈 Win
2021. 7. 19. 00:00
728x90
블로그 이사했습니다!
👇 블로그 이전 공지 👇
👇 새 블로그에서 글 보기 👇
[Error][GIT] refusing to merge unrelated historiese — Win Record (tistory.com)
문제상황
git pull할 때 다음과 같은 문제가 발생했다.
fatal: refusing to merge unrelated histories
원인
서로 관련 기록이 없는 두 프로젝트를 병합하려 할 때 발생한다. git에서는 기본적으로 이런 상활을 거부하는 것이다.
해결
pull 할 때, 다음과 같은 옵션을 추가해 진행한다.
git pull origin <name> --allow-unrelated-histories
두 프로젝트의 히스토리를 저장하는 상황에 사용한다. 상관없는 두 프로젝트를 병합하는 것을 허용하겠다는 옵션이다.