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标签"
相关推荐
午安~婉4 小时前
Git中SSH连接
前端·git·gitee
888CC++4 小时前
VS Code Git 工作树:解锁多分支并行开发新体验
git
阿虎儿4 小时前
Git exclude 功能解析
git
隔窗听雨眠6 小时前
VS Code Git工作树:多分支并行开发的完整实践方案
git
^yi6 小时前
【Linux系统编程】快速上手git仓库管理,核心三板斧
git
郝同学今天有进步吗7 小时前
构建 LangGraph Code Review Agent(四):文件过滤与 AnalysisPackage 分包
git·python·ai·code review
胖大和尚1 天前
git本地实现local->remote推送
git
BerryS3N1 天前
Code Git 工作树:多分支开发的痛点与工作树的曙光
大数据·git·elasticsearch
lbb 小魔仙1 天前
Git + Python 项目工作流最佳实践:pre-commit、CI、CHANGELOG 自动化
git·python·ci/cd
Xu_youyaxianshen1 天前
Git 零基础常用指令手册(Gitee / GitHub 通用 )
git·gitee·github