How to remove all git origin and local tags?

后端 未结 2 1843
栀梦
栀梦 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:24

    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
    

提交回复
热议问题