git tag查看、创建与删除

tag管理

查看tag 太多的话用 grep 过滤

$ git tag | grep dev_20150525
# 创建tag
$ git tag -a dev_20150525_16 -m 'xxxx'

把tag push到远程

$ git push origin dev_20150525_16

Counting objects: 1, done.
Writing objects: 100% (1/1), 156 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
To git@github.com:FrankFan/test.git
 * [new tag]         test_tag1 -> test_tag1

删除tag 本地删除

$ git tag -d test_tag1
Deleted tag 'tag_20150714_01' (was 5cbb087)

删除远程的tag, 公司gitlab配置为没有删除远程tag的权限

$ git push origin :refs/tags/reg_201050709_01
To git@github.com:FrankFan/test.git
 - [deleted]         tag_20150713_01
posted on 2015-07-14 16:20  Frank.Fan  阅读(10543)  评论(0编辑  收藏  举报