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 。

相关推荐
gwf2164 小时前
SSD读写速度深度解析:顺序读写vs随机读写、IOPS、延迟,你的硬盘性能到底怎么看?
git·嵌入式硬件·缓存·github·智能硬件
西邮彭于晏4 小时前
图文详解:Git分支创建、合并与冲突解决|新手零门槛完整教程
大数据·git·elasticsearch
nuisthou9 小时前
git常用命令总结
git
西邮彭于晏9 小时前
Git 标签(Tag)与版本发布完整指南|附全场景命令速查表
大数据·git·elasticsearch
潘正翔10 小时前
k8s进阶_Harbor镜像仓库
git·云原生·容器·kubernetes·gitee·github
InfinitePlus12 小时前
Git基本操作-命令行
git
茉莉玫瑰花茶12 小时前
TCP 全连接队列与 tcpdump 抓包
git·github·tcp·tcpdump
炸膛坦客13 小时前
Git 和 GitHub:(十四)rebase 到某个有新提交的远程仓库的分支
git·github
炸膛坦客1 天前
Git 和 GitHub:(十二)基于远程仓库的某一个分支的某一笔提交创建新分支
git·github
炸膛坦客1 天前
Git 和 GitHub:(十三)改分支名
git·github