• 돌아가기
  • 아래로
  • 위로
  • 목록
  • 댓글
Error

git push 에러 해결하기([rejected] master -> master (fetch first) error: failed to push some refs to)

달소 달소 727

0

0

깃을 사용중에 위와같은 오류가 나왔을때 해결방법입니다.

! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/dalso~~'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull …') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

원인은 깃의 원격 저장소와 현재 로컬 저장소가 동기화되어있지 않기때문입니다.
해결방법도 동기화 시켜주면 간단하게 해결됩니다.

git pull --rebase 원격저장소별칭 master

위 명령어를 통해 정상적으로 동기화 시켜주면 다시 push하는데 이상없을겁니다.

신고공유스크랩
0

댓글 쓰기 권한이 없습니다. 로그인

취소 댓글 등록

신고

"님의 댓글"

이 댓글을 신고하시겠습니까?

댓글 삭제

"님의 댓글"

삭제하시겠습니까?


목록

공유

facebooktwitterpinterestbandkakao story

주간 조회 수 인기글

주간 추천 수 인기글