问题
How do you remove a git tag that has already been pushed? Delete all git remote (origin) tags and Delete all git local tags.
回答1:
1. Delete All local tags. (Optional Recommended)
git tag -d $(git tag -l)
2. Fetch remote All tags. (Optional Recommended)
git fetch
3. Delete All remote tags.
git push origin --delete $(git tag -l) # Pushing once should be faster than multiple times
4. Delete All local tags.
git tag -d $(git tag -l)
回答2:
For windows using command prompt:
Deleting local tags:
for /f "tokens=* delims=" %a in ('git tag -l') do git tag -d %a
Deleting remote tags:
for /f "tokens=* delims=" %a in ('git tag -l') do git push --delete origin %a
来源:https://stackoverflow.com/questions/44702757/how-to-remove-all-git-origin-and-local-tags