반응형
에러 : failed to push some refs to '레파지토리 주소' Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again.
원인 : push 하려고 할 때 원격 저장소와 로컬 저장소 내용이 같지 않아서 발생
원격저장소에서 파일을 삭제해버림
해결 : git pull origin master : 작업한 내용과 합쳐서 올리거나
git pull --rebase origin master 후
git push origin master 하면 다시 정상적으로 add 된다
그니까앞으로 : push하기 전 & 작업하기 전에 git pull 명령어를 통해서 원격저장소의 최신상태를 유지한 상태에서 push를 해야함
반응형