github 저장소 생성 후 처음 remote 연결후 git push origin master시
[rejected]master -> master(non-fast-forward) 에러가 발생할 때
원인
github에 생성된 원격 저장소와 로컬에 생성된 저장소간 공통분모가 없는 상태에서 merge시도로 인해 에러 발생함.
관련 없는 두 저장소를 병합하는 것은 안되도록 되어 있음...
해결방법
git pull origin master --allow-unrelated-histories
등록된 댓글이 없습니다.