본문 바로가기
카테고리 없음

Git fatal: refusing to merge unrelated histories

by cook_code 2023. 7. 19.
반응형

Git fatal: refusing to merge unrelated histories

  • 원격 저장소에서 pull 진행시 발생하는 에러
  • 서로 연관성이 없는 두 히스토리를 병합하려고 할 때, 공통되는 commit이 없어 pull 명령어를 사용할 수 없다.

 

해결 방법

  • git clone으로 로컬저장소에 원격저장소 내용을 clone 하기
  • pull 명령어에 옵션을 추가해 강제로 pull
$ git pull origin master --allow-unrelated-histories
반응형