Git 标签
标签
tag 就是一个让人容易记住的有意义的名字,它跟某个 commit 绑在一起。
新建一个标签
1 | git tag <tagname> |
命令 git tag <tagname> 用于新建一个标签,默认为 HEAD,也可以指定一个 commit id。
指定标签信息
you can use like this: git tag -a <tagname> -m "say something…"
1 | git tag -a <tagname> -m <description> <branchname> or commit_id |
PGP 签名标签
you can use like this: git tag -s <tagname> -m "say something…"
1 | git tag -s <tagname> -m <description> <branchname> or commit_id |
查看所有标签
1 | git tag |
推送一个本地标签
1 | git push origin <tagname> |
推送全部未推送过的本地标签
1 | git push origin --tags |
删除一个本地标签
1 | git tag -d <tagname> |
删除一个远程标签
1 | git push origin :refs/tags/<tagname> |
本博客所有文章除特别声明外,均采用 CC-BY-SA-3.0 许可协议。转载请注明来源 张小剩的博客!