18

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 git remote tag?", but I didn't find a way to do it from eGit.

Community
  • 1
  • 1
Tobias Liefke
  • 8,637
  • 2
  • 41
  • 58

1 Answers1

26

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.

Tobias Liefke
  • 8,637
  • 2
  • 41
  • 58
  • Thank you! It's crazy we can add tags from Team -> Advance -> Tag, but we can't delete them from there! – Craigo Jan 10 '16 at 23:59
  • Alternatively, you can put your cursor in the `Remote ref to delete:` block, then click CTRL+SPACE and select the tag you want to delete (The tags are below the branches). – Everlight Sep 13 '18 at 19:34
  • If you read my _whole_ answer you will notice that I found this already by myself. – Tobias Liefke Sep 13 '18 at 20:29
  • Amazing! Thank you. If you're using Gerrit, you can get some additional help on setting the right authorizations here: https://stackoverflow.com/questions/28017325/as-using-gerrit-how-to-remove-remotes-tag – Jonathan Benn Nov 29 '18 at 20:38