Created
November 1, 2022 09:24
-
-
Save joesan/7e7337f46d561b4542bb5190aaca1a8c to your computer and use it in GitHub Desktop.
Delete All Git Tags Locally and Remote
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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