본문 바로가기

Git/Git & CodeCommit & Bitbucket

Bitbucket [rejected] 오류 해결하기 (매우 간단)

# [rejected] 오류 해결하기

- 오류 내용은 아래와 같다.

 ! [rejected]        HEAD -> master (fetch first)
error: failed to push some refs to 'https://aaa.git'
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.

- 해결 방법

+만 붙여주면 된다.

git push -u dev-bucket +HEAD:master

+를 붙이면 해당 내용과 상관없이 강제로 push를 진행한다? 라고 이해하면 되려나?

git push origin +master

 

암튼 끝.