Tobias Liefke Tobias Liefke - 10 days ago 5
Git Question

How can I delete a remote tag in eGit?

I can remove a local tag very easy in the Git Repositories View of eclipse.

But if that tag was a remote tag (originally) and I make a push - nothing happens. On the next pull that tag will reappear again.

Neither

Remote
->
Push tags
nor
Remote
->
Push
->
Add all tag specs
removed that tag from origin. And I've tried
Add delete ref specification
in the same dialog, but Eclipse won't let me add
tag-name
or
:refs/tags/tag-name
.

I know that I can use the command line, as described in "How to delete a remote git tag?", but I didn't find a way to do it from eGit.

Answer

Playing with Team -> Remote -> Push I found the solution.

I have to enter in Remote ref to delete:

refs/tags/my-tag-name

and add that to the specifications to push. When I finish the dialog the tag is removed from remote.

The same applies, if I just click Add All Tags Spec (or something else that creates a new row in Specifications to push), click on the Mode column to convert the Update into a Delete and enter the correct ref from above into the Destination Ref column.

Funny thing: The tag is not offered if I open the drop down of Remote ref to delete, but if I use Ctrl+Space I can choose from the list of tags (and branches) and it generates the correct ref spec.

Comments