Wednesday, March 30, 2011

How to delete a remote git tag

I suppose this is probably taboo. You're not supposed to mess with tags once you've pushed them upstream. Still, there are times when it is necessary, and unfortunately `git push --tags` does not push the local removal of tags upstream. It always takes me forever to figure this out, so I figured I'd write it down. Maybe someone else will find it useful.


git tag -d tag-to-delete
git push origin :refs/tags/tag-to-delete


This will remove that tag from the remote repository. You can verify this by pulling from the remote again and seeing that it does not get pulled back down.