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标签"
相关推荐
qq_423019552 小时前
git push 后 文件夹异常打不开
git·gitee
tonylua4 小时前
从神州22极限救援,看懂Git高级玩法
git
骑鱼过海的猫1236 小时前
【git】git学习记录
git·学习·elasticsearch
测试人社区—84167 小时前
Mocking与Stubbing在单元测试中的正确使用
人工智能·git·单元测试·自动化·bug·postman
milanyangbo12 小时前
像Git一样管理数据:深入解析数据库并发控制MVCC的实现
服务器·数据库·git·后端·mysql·架构·系统架构
猫头虎-人工智能12 小时前
openEuler远程批量部署实战 SSH VNC IPMI全流程解析
运维·git·开源·ssh·github·开放原子·开源软件
Cx330❀12 小时前
Git 基础操作通关指南:版本回退、撤销修改与文件删除深度解析
大数据·运维·服务器·git·算法·搜索引擎·面试
CaracalTiger13 小时前
在openEuler操作系统中多样性算力支持与性能压力测试操作
linux·运维·git·开源·开放原子·压力测试·开源软件
草莓熊Lotso14 小时前
企业级 Git 分支管理模型实战:从 Git Flow 到 DevOps 落地
运维·服务器·开发语言·c++·人工智能·git·devops
小王不爱笑1321 天前
gitignore基本使用+Git分支使用
git