批量删除git tag

 

批量删除远程tag

$ git ls-remote -t --refs -q | awk '{print ":"$2}' | xargs git push origin
To ssh://gitlab.knd.com.cn:10022/qiyuexin/keyboard.git
 - [deleted]         KBNC_V0.1.0
 - [deleted]         KBNC_V0.2.0
 - [deleted]         KBNC_V0.3.0
 - [deleted]         KBNC_V0.4.0
 - [deleted]         KBNC_V0.4.3
 - [deleted]         KBNC_V0.4.4
 - [deleted]         KBNC_V0.4.5

 

批量删除本地tag

$ git tag -l | xargs git tag -d
Deleted tag 'KBNC_V0.1.0' (was 4ef0a73)
Deleted tag 'KBNC_V0.2.0' (was 8c5bafe)
Deleted tag 'KBNC_V0.3.0' (was 9c8d305)
Deleted tag 'KBNC_V0.4.0' (was fd592e2)
Deleted tag 'KBNC_V0.4.3' (was 74a9a66)
Deleted tag 'KBNC_V0.4.4' (was 7ee3e79)
Deleted tag 'KBNC_V0.4.5' (was a4b3a4e)

 

posted @ 2022-06-20 15:05  QIYUEXIN  阅读(295)  评论(0编辑  收藏  举报