I know I can go to github.com, select my tag and then click delete, but this will only delete the Tag information not the actual Tag. So how to delete it forever?!
Asked
Active
Viewed 7,172 times
2 Answers
24
Run this in your local git repository:
git fetch
git tag
git tag -d {tag-name}
git push origin :refs/tags/{tag-name}
Visit Github.com and refresh to see the tags have been removed.

FullByte
- 149
- 1
- 2
- 12

Mahmoud Zalt
- 30,478
- 7
- 87
- 83
1
Mahmoud's answer is confirmed by:
- "How to Delete a Tag on GitHub" (Cory LaViska)
- GitHub "Working with Tags"
Releases are also lightweight Git tags, with some extra awesome features to help you release software.
So On GitHub side, you don't actually delete an annotated tag, only a lightweight one.
Pushing an empty reference to a GitHub tag will actually delete it from the GitHub repo.
-
@choroba Thank you for the edit, I was about to fix that link ;) – VonC Jun 26 '16 at 07:16