Programming, Projects, Technology

Deleting remote git tags.

I did a bit of googling on how to delete remote git tags and there was a lot of options, some of which seemed a bit risky.

Turns out there is a really simple way of doing this.

Just do something like:

git tag -d v2.0
git push origin :v2.0

So first we just remove our tag locally, then push the empty tag to the remote end and it knows its empty and so remove its.

So the trick to removing a tag is essentially sending the empty tag to the remote after its removes, so even if you already deleted it, no worries, just push it out there and your done.

And that is all there is to it!