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标签"
相关推荐
stu_kk8 分钟前
Git常用操作指令
git
顾默@1 小时前
关于git推送到远程仓库的一些操作
git
___波子 Pro Max.4 小时前
Git 2.23新增命令switch使用指南
git
℘团子এ11 小时前
git中,项目怎么更换远程仓库连接地址
git
言之。17 小时前
Git Hooks
git
代码AI弗森18 小时前
Git Bash 与 PowerShell:定位差异、使用场景与选择建议
开发语言·git·bash
森叶19 小时前
Git flow command error: ‘flow‘ is not a git command 问题解决
git
天麓21 小时前
git merge 举例
git
AI_56781 天前
Git冲突治理白皮书:智能标记与可视化协同的下一代解决方案
大数据·人工智能·git·机器学习
念丶小宇1 天前
Git常用指令
大数据·git·elasticsearch