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 。

相关推荐
OYangxf19 小时前
Git Commit Message
运维·git
芯有所享20 小时前
【芯片设计中的版本管理:Git与SVN的实战选择指南】
经验分享·git·svn
开发者联盟league20 小时前
解决git报错 filename too long
git
jian1105820 小时前
android studiod git在git reset origin/main以后,会有删了又新建的导包问题
git
搬砖的梦先生1 天前
Codex 小步迭代 + Git Commit + 多任务并行组合版
大数据·git·elasticsearch
phltxy1 天前
Redis Java 集成到 Spring Boot
数据库·redis·git
空太Jun1 天前
Git 使用学习笔记
笔记·git·学习
空中海1 天前
Git-01:基础篇 — 版本控制与日常操作
git·学习
TE-茶叶蛋1 天前
JetBrains IDE(如 IntelliJ IDEA)的 Git 面板
ide·git·intellij-idea
蓝黑墨水1 天前
群晖使用git遇到的问题
git