Git:tag的用法

栏目: 编程工具 · 发布时间: 7年前

内容简介:记录几个主要的命令,用于速查:

Gitgit-tag 命令的使用。

前言

GittagSVN 不一样, SVNtag 其实还是一个分支, Gittag 则真的是一个标签,是给某一个 commit 打上一个标签,这个说明了 Linus 的巧妙设计,那么,对这个 tag 做一个笔记。

正文

记录几个主要的命令,用于速查:

实例:列显已有的标签

$ git tag

实例:只看某一个tag

$ git tag -l 'v1.4.2.*'

实例:新建含附注的标签

$ git tag -a v1.4 -m 'my version 1.4'

-a 相当于给标签起个名字, -m 是写一些注释。

实例:查看相应标签的版本信息,并连同显示打标签时的提交对象

$ git show v1.4

实例:签署标签

$ git tag -s v1.5 -m 'my signed 1.5 tag'

实例:轻量级标签

$ git tag v1.4-lw

实例:验证标签

$ git tag -v v1.4.2.1

这个功能的具体意义还没有搞明白。

实例:后期加注标签

$ git tag -a v1.2 9fceb02

实例:推送某一标签到服务器

$ git push origin v1.5

实例:推送所有标签到服务器

$ git push origin --tags

以上所述就是小编给大家介绍的《Git:tag的用法》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Types and Programming Languages

Types and Programming Languages

Benjamin C. Pierce / The MIT Press / 2002-2-1 / USD 95.00

A type system is a syntactic method for automatically checking the absence of certain erroneous behaviors by classifying program phrases according to the kinds of values they compute. The study of typ......一起来看看 《Types and Programming Languages》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具