Notice
Recent Posts
Recent Comments
Link
«   2025/07   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

iOS 개발일지

git push가 안될 때!! hint: Updates were rejected because the tag already exists in the remote. 본문

iOS

git push가 안될 때!! hint: Updates were rejected because the tag already exists in the remote.

Lia's iOS 2023. 12. 15. 10:41

 

평소와 같이 소스트리로 commit하고, push 하려는 순간...

갑자기 에러가 났다며 푸시가 되지 않았다.

 

사람 겁먹게 모든 태그를 쫙 보여주지만, 문제가 있는 곳은 [rejected] 한 곳!

 

 ! [rejected]            Korea(3.3.4) -> Korea(3.3.4) (already exists)
updating local tracking ref 'refs/remotes/origin/Release'
error: failed to push some refs to 'http://~~~.git'
hint: Updates were rejected because the tag already exists in the remote.
Branch 'Release' set up to track remote branch 'Release' from 'origin'.
Completed with errors, see above

 

 

hint: Updates were rejected because the tag already exists in the remote.

원격 저장소와 로컬의 태그가 맞지 않아 잠깐 꼬인 상태이니, 이 둘을 맞추기만 하면 된다.

 

터미널에서 아래 명령어를 통해 태그를 받아오면 해결~

git pull --tags

 

 

위 방법으로 해결되지 않는다면, 아래 명령어로 충돌하는 로컬 태그를 원격 버전으로 재정의하여 해결할 수 있다.

git pull --tags -f