본문 바로가기
웹개발/git

fatal: refusing to merge unrelated histories, error: failed to push some refs to 에러 해결

by julysein 2020. 9. 20.
728x90

처음에 git에 repository를 만들어 놓은 상태에서 local 파일을 업로드하려고 할 때 이런 오류가 발생했다.

fatal: refusing to merge unrelated histories, error: failed to push some refs to

 

git pull origin master --allow-unrelated-histories

를 이용해서 해결했다. 별로 좋지 않은 명령어이니 처음에 git을 push하는 과정에서 생기는 에러인 경우에만 사용하시길 바란다. 

728x90