hint: 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.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
위와 같은 에러가 뜰때는 원격 저장소에서 push하려는 브랜치의 커밋 이력을 확인해보자.
나의 경우에는 저장소를 병합하기 전에 사용한 feat/#17 브랜치를 지우지 않아서 발생한 문제였다.
참고 👇
https://docs.github.com/ko/get-started/using-git/dealing-with-non-fast-forward-errors
non-fast-forward 오류 처리 - GitHub Docs
Git에서 커밋을 잃지 않고 원격 리포지토리를 변경할 수 없는 경우가 있습니다. 이 경우 푸시가 거부됩니다.
docs.github.com
반응형
'git' 카테고리의 다른 글
GitLab에 있는 프로젝트를 GitHub로 복사하기 (0) | 2024.04.16 |
---|---|
git 저장소 병합 (0) | 2024.01.15 |
[git] 다른 브랜치에 커밋을 잘못 올렸을 때 (0) | 2023.11.14 |
error: failed to push some refs to ~ (0) | 2023.06.25 |
[Git] feature branch 업데이트하기 (0) | 2023.05.18 |