[git] git pull 에러

github에 새로운 프로젝트를 푸시하기 위해서 아래와 같이 pull 명령어를 실행했더니 에러가 표시되었다. 


>> git pull origin master

-- fatal: refusing to merge unrelated histories



이럴 경우 아래와 같이 옵션을 주어 pull 받도록 하자


git pull origin branchname --allow-unrelated-histories



이렇게 에러가 떨어지는 이유는 아래와 같다고 한다..... (시간날떄 해석을....)


"git merge" used to allow merging two branches that have no common base by default, which led to a brand new history of an existing project created and then get pulled by an unsuspecting maintainer, which allowed an unnecessary parallel history merged into the existing project. The command has been taught not to allow this by default, with an escape hatch "--allow-unrelated-histories" option to be used in a rare event that merges histories of two projects that started their lives independently.


http://stackoverflow.com/questions/37937984/git-refusing-to-merge-unrelated-histories