How to remove all git origin and local tags?

后端 未结 2 1834
栀梦
栀梦 2021-01-29 18:59

How do you remove a git tag that has already been pushed? Delete all git remote (origin) tags and Delete all git local tags.

2条回答
  •  孤独总比滥情好
    2021-01-29 19:03

    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)
    

提交回复
热议问题