Delete a local tag
- Check existing local tags with
git tag. - Delete the tag with
git tag -d v0.1.0. (Replacev0.1.0with the tag you want to delete)
Delete a remote tag
- Check existing remote tags with
git ls-remote --tags --refs origin. - Delete the remote tag with
git push origin --delete v0.1.0. (Replacev0.1.0with the tag you want to delete)
Deleting the remote tag does not automatically remove local copies held by collaborators. Verify the target first because this affects everyone using the remote.
Deleting a tag removes that reference; it does not directly delete the commit it pointed to or rewrite other branch history. The commit will no longer be reachable by that tag name. origin is an example remote name, so replace it if your remote uses another name.
