[GitHub오류] error: failed to push some refs to ' 'hint: Updates were rejected because the remote contains work that you do
문제 상황
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 pushinghint: to the same ref.
You may want to first integrate the remote changeshint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
local에서 완료했던 프로젝트를 remote에 push 하려니까 문제가 발생했다.
local의 feature/List 브랜치에서 작업 후
git push origin feature/List
이전에 햇던 상황은
1. 작업 : local feature/List 에서 작업
2. PUSH : git push origin feature/List remote에 push
3. PR : (remote) feature/List -> master PR
4. PULL : (local) git pull origin master 닫지 않은 상태에서 master -> (local) feature/List 로 pull
5. 작업 : local feature/List에서 신나게 작업
6. PUSH: git push origin feature/list 다시 push -> 여기서 오류 발생
아마 4번에서 문제가 발생한 듯 하다
해결방법
강제push....
git push -f origin feature/List
강제는 좋지 않지만.. 깔끔하게 해결이 되었다.