git push origin main 하면 rejected 에러가 뜹니다. "Updates were rejected because the remote contains work that you do not have locally" 이라고 나오는데 어떻게 하나요?
git push origin main 하면 rejected 에러가 뜹니다. "Updates were rejected because the remote contains work that you do not have locally" 이라고 나오는데 어떻게 하나요?
댓글 2
원격 저장소에 로컬에 없는 커밋이 있기 때문입니다. 먼저 pull 하세요.
⚠️
git push -f(강제 push)는 절대 하지 마세요. 다른 사람의 커밋이 사라질 수 있습니다.