国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > 服务器 > git tag

git tag

来源:程序员人生   发布时间:2017-03-01 09:17:37 阅读次数:6062次

Git 中的tag指向1次commit的id,通经常使用来给开发分支做1个标记,如标记1个版本号。

git tag  查看所有的tag

git tag -a v1.01 -m "Relase version 1.01"

过滤查看

git tag -l

       -l <pattern>, --list <pattern>
           List tags with names that match the given pattern (or all if no pattern is given). Running
           "git tag" without arguments also lists all tags. The pattern is a shell wildcard (i.e.,
           matched using fnmatch(3)). Multiple patterns may be given; if any of them matches, the tag
           is shown.



 -a, --annotate
           Make an unsigned, annotated tag object

    -m <msg>, --message=<msg>
           Use the given tag message (instead of prompting). If multiple -m options are given, their
           values are concatenated as separate paragraphs. Implies -a if none of -a, -s, or -u <keyid>
           is given.

-a 是添加标签,其后要跟新标签号,-m 及后面的字符串是对该标签的注释。


git tag -d v1.01
注解:-d 表示删除,后面跟要删除的tag名字

生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生