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 。

相关推荐
Star_KeyW5 小时前
【最新】Git简介与完整安装
git
深紫色的三北六号9 小时前
基于 Git 某个分支创建一个全新的仓库(GitHub / GitLab)
git·gitlab·github
-拟墨画扇-10 小时前
Git | 标签操作
git·gitee·github·gitcode
狂龙骄子10 小时前
使用git filter-branch命令修改历史提交
git·filter-branch·迁移仓库历史·所有权转移·修改历史提交
C2X10 小时前
关于Git Graph展示图的理解
前端·git
CryptoRzz11 小时前
StockTV API 对接全攻略(股票、期货、IPO)
java·javascript·git·web3·区块链·github
-拟墨画扇-11 小时前
Git | 远程仓库操作
git·gitee·github
NuageL12 小时前
第一次用Git协作流程记录和踩坑
git
特级业务专家14 小时前
这下发布不需要Jenkins了
linux·git·docker
0和1的舞者14 小时前
Git 实战踩坑:如何让多个 IDE 项目共用一个远程仓库(附子模块问题解决)
git·开发·仓库·码云·子模块·操作·冲突