git push 에러

hyuckhoon.ko·2021년 8월 19일
0

What I learned in first year

목록 보기
146/146

! [rejected] staging -> staging (fetch first)
error: failed to push some refs to '
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.


원격 staging과 로컬 staging 간 파일 불일치
-> 깃허브에서 바로 수정 후 배포 후, 로컬에서 따로 다른 작업 진행한 경우
동일 브랜치에 대해서 변형 생성

따라서, 아래와 같이 동기화 시켜준다.

git pull --rebase origin staging
git push origin staging

0개의 댓글