[error 내용]
이클립스에서 github로 commit & push를 할 때 가끔 rejected - non-fast-forward 오류가 뜸
나는 commit & push를 진행했는데 github는 업데이트되지 않았고
이클립스상의 staging 영역에서 파일도 사라지기 때문에 매우 불안
![](https://t1.daumcdn.net/keditor/emoticon/niniz/large/003.gif)
[error 해결 방법]
브랜치의 경로를 재설정해 주면 됨
브랜치의 경로가 바뀌거나 로컬 혹은 git 폴더인 브랜치 저장소에 변경사항이 있을 때
이러한 현상이 나타나는 듯함
이클립스 window - Show View - Other - Git - Git Repositories 추가
Git Repositories에서 해당 저장소의 Remotes - origin - ↓ 저장소 이름 - Configure Fetch 클릭
Ref mappings에 경로 존재하는 것 확인 후 Advanced... 접속
기존 경로가 있다면 삭제 후 Add create/update specification 창의 2칸 모두 내가 원하는 저장소의 로컬, 깃허브 브랜치 선택 후 Add Spec 클릭, Finish 클릭
Save and Fetch
Git Repositories - Branches - Local - 로컬 저장소 이름 - Merge 클릭
Remote Tracking - 저장소 클릭 후 Merge 클릭
원하는 프로젝트 - Team - Remote - Push
Push가 잘된 것 확인!
![](https://t1.daumcdn.net/keditor/emoticon/friends1/large/010.gif)