Delete the git tags from remote and local

31 Jan 2021 1 min

Git tags are use to specify release, pre-release or specific commit that may be more important than any other commit. Here are the useful commands and examples


Deleting a local tag:

git tag -d <tag_name>

# git tag -d v0.0.1  //only from local


Delete a tag from remote:

git push --delete origin tagname

# git push --delete origin v0.0.1


Delete All local tags

git tag -d $(git tag -l)


Fetch remote All tags

git fetch --tags


Delete All remote tags.

git push origin --delete $(git tag -l)