Skip to content

Instantly share code, notes, and snippets.

@joesan
Created November 1, 2022 09:24
Show Gist options
  • Save joesan/7e7337f46d561b4542bb5190aaca1a8c to your computer and use it in GitHub Desktop.
Save joesan/7e7337f46d561b4542bb5190aaca1a8c to your computer and use it in GitHub Desktop.
Delete All Git Tags Locally and Remote
Step 1: Delete all Local Tags
```
git tag | xargs git tag -d
```
Step 2: Delete all Remote Tags
```
git ls-remote --tags --refs origin | cut -f2 | xargs git push origin --delete
```
To verify that the tags are really deleted, run the following command and the result should be empty
```
git tag
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment