❯ gp
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/sh-cho/django-custom-logging.git
! [remote rejected] master -> master (missing necessary objects)
error: failed to push some refs to 'https://github.com/sh-cho/django-custom-logging.git'

푸시했는데 이런 오류가 나옵니다. force push도 먹히지 않습니다.

 

시나리오는 이렇습니다.

로컬 HEAD가 origin/HEAD보다 한 커밋 앞서고 있을 때 태그를 딴 뒤, gp --tags로 태그를 먼저 푸시해놨습니다.

그 다음 gp로 master 브랜치에서 푸시를 하려고 하니 안됩니다.

 

git push --delete origin {태그명}

해결방법은 이미 올라간 태그를 지우는 겁니다

반응형