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 。

相关推荐
透明的玻璃杯2 小时前
git应用
git
炸炸鱼.3 小时前
Git+Jenkins实战(一):从零搭建自动化发布与回滚系统(附完整代码)
git·jenkins
言6666 小时前
要忽略前端依赖包node_modules的文件在目录下 git暂存区消失
git
胡小禾6 小时前
Git Worktree
git
程序员小羊!7 小时前
18 GIt
git
怣疯knight7 小时前
Git 本地分支关联远程分支 常用命令汇总
git
ANNENBERG7 小时前
git分支开发管理
git
坤坤藤椒牛肉面7 小时前
GIT的使用
git
w3296362717 小时前
使用 OpenCode 在 Windows 上加速安装 Playwright 的完整指南
windows·git
我家媳妇儿萌哒哒1 天前
git:无法推送refs到远端。您可以试着运行“拉取”功能,整合您的更改。
git