git之tag操作

  • 查看本地有哪些 tags
shell 复制代码
# git tag -l
v0.0.3
v0.0.5
v0.0.6
  • 查看远程有哪些 tags
shell 复制代码
# git ls-remote --tags
From https://github.com/eyjian/gomooon.git
1fe7f5ecf369cba34f4328285ce1ec72d62c091e        refs/tags/v0.0.3
9371db55046109d7fc9a9f75625d5ec31c326ad1        refs/tags/v0.0.5
bw1vb29umqswcqydvqqldajzatenmasga1ueawwe        refs/tags/v0.0.6

命令格式:

shell 复制代码
git ls-remote --tags <remote_name>

将 <remote_name> 替换为远程仓库的名称,通常为 origin 。

  • 删除本地的 tag
shell 复制代码
git tag -d v0.0.6

命令格式:

shell 复制代码
git tag -d <tag_name>
  • 删除远程的 tag
shell 复制代码
git push origin :refs/tags/v0.0.6

命令格式:

shell 复制代码
git push <remote_name> :refs/tags/<tag_name>

将 <remote_name> 替换为远程仓库的名称,通常为 origin 。

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