Git 标签

$ git tag -a v1.0

git tag -a 标签注解,就像提交注解。

执行 git log --decorate 可看我们标签:

复制代码
*   d5e9fc2 (HEAD -> master) Merge branch 'change_site'
|\  
| * 7774248 (change_site) changed the runoob.php
* | c68142b 修改代码
|/  
* c1501a2 removed test.txt、add runoob.php
* 3e92c19 add test.txt
* 3b58100 第一次版本提交

例如,忘打标签,追加标签:

复制代码
$ git tag -a v0.9 85fc7e7
$ git log --oneline --decorate --graph
*   d5e9fc2 (HEAD -> master) Merge branch 'change_site'
|\  
| * 7774248 (change_site) changed the runoob.php
* | c68142b 修改代码
|/  
* c1501a2 removed test.txt、add runoob.php
* 3e92c19 add test.txt
* 3b58100 (tag: v0.9) 第一次版本提交

查看所有标签:

复制代码
$ git tag
v0.9
v1.0

指定标签:

复制代码
git tag -a <tagname> -m "runoob.com标签"

PGP签名标签命令:

复制代码
git tag -s <tagname> -m "runoob.com标签"
相关推荐
aoxiang_ywj1 分钟前
git add 和git commit之后怎么撤销?
git
winner888134 分钟前
告别“这个分支是干啥的?”:Git分支层级命名实战
git·git push -u·分支关联·层级分支命名
真上帝的左手1 小时前
3. 代码管理-Git实战
git
lin62534224 小时前
Android仿小米视频播放器的缩放滚轮
android·git·github
互亿无线明明4 小时前
在 Go 项目中集成国际短信能力:从接口调试到生产环境的最佳实践
开发语言·windows·git·后端·golang·pycharm·eclipse
world_in_world4 小时前
git常见场景命令
git
码上成长5 小时前
长耗时接口异步改造总结
前端·git·后端
Elieal5 小时前
Git 面试题全面汇总
git
rchmin5 小时前
Git撤销命令revert与reset区别
git
达子6665 小时前
git-lfs的安装配置,解决大文件存储问题
linux·c++·git