Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get rid of "would clobber existing tag"

Tags:

git

I'm using git in VSCodium and each time I try to pull git is complaining.

Looking into the log I see

> git pull --tags origin master From https://github.com/MY/REPO  * branch            master     -> FETCH_HEAD  ! [rejected]        latest     -> latest  (would clobber existing tag)    9428765..935da94  master     -> origin/master 

Doing the command with --force helps until the next time.

It's unclear to me what's going wrong here. What happened and how can I resolve this issue?

I mean: Besides trashing my local repo and cloning again.

like image 867
Skeeve Avatar asked Sep 20 '19 15:09

Skeeve


People also ask

How do I remove a local tag?

To delete the Git tag from the local repo, run the git tag -d tag-name command where tag-name is the name of the Git tag you want to delete. To get a list of Git tag names, run git tag.

How do I remove a remote tag?

Select and expand the "Tags" tab on the left. Right-Click on the tag you want deleted. Select "Delete YOUR_TAG_NAME" In the verification window, select "Remove Tag From Remotes"

How do I checkout to a tag?

In order to checkout a Git tag, use the “git checkout” command and specify the tagname as well as the branch to be checked out. Note that you will have to make sure that you have the latest tag list from your remote repository.

How do you push tags?

You can push all local tags by simply git push --tags command.


1 Answers

You should update your local tags with remote tags:

git fetch --tags -f 

Then pull again.

like image 98
Tuan Tran Avatar answered Sep 22 '22 12:09

Tuan Tran