[Git Error] error: failed to push some refs to ..

민태호·2024년 7월 19일

에러 목록

목록 보기
2/5

에러 발생!

error: failed to push some refs to {github-address}

Updates were rejected because the remote contains work that you do not have locally.

로컬에 없는 작업이 원격 저장소에 있으므로 업데이트가 거부됨

This is usually caused by another repository pushing to the same ref.

이건 보통 다른 레포가 같은 곳으로 푸시되었기 때문임

You may want to first integrate the remote changes (e.g., 'git pull ...') before pushing again.

다시 push하기 전에 git pull과 같은 명령어로 변경 사항을 먼저 통합하면 됨

push 시도 시, 해당 github repository에는 있지만 내 로컬에는 없는 파일이 있을 경우 해당 에러가 발생한다고 한다.

해결

그럼 파일을 갱신? 해줘야 겠지?

pull을 하고 다시 push를 시도해보자

profile
지렁이도 성장하고 싶으면 꿈틀거린다

0개의 댓글