본문 바로가기
IT/Git

fatal: refusing to merge unrelated histories

by DOSGamer 2020. 2. 18.
반응형

원인

git 과 연결된 폴더의 파일을 싹 바꿔버린 경우

master 브랜치와 새로 바뀐 파일들이 같은 history 를 사용하지 않기 때문이다.

부모가 틀림

 

github 에서도 commit histories 가 틀리다고 merge 를 못한다

 

해결방법

강제로 pull 해서 덮어버린다

git pull origin (branchname) --allow-unrelated-histories

 

반응형

'IT > Git' 카테고리의 다른 글

앱 버전관리 Semantic Versioning  (0) 2022.09.20
Git 명령어 정리  (0) 2022.08.26
Git Commit Message 정리  (0) 2022.08.26
GIT commit message 규칙  (0) 2022.08.12
git log 한글 깨짐 (windows)  (1) 2020.02.13
Git 사용시 실수 대처법  (0) 2020.02.03
git 줄바꿈 문제 (warning: CRLF will be replaced by LF in .gitignore)  (0) 2019.10.17
git tag 사용하기  (0) 2019.08.02