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 。

相关推荐
一只积极向上的小咸鱼17 小时前
嵌套 Git 仓库 / gitlink / submodule 问题总结
大数据·git·elasticsearch
LuDvei17 小时前
git拉取报错问题
git
程序猿多布18 小时前
Fork操作笔记
git·fork
荪荪18 小时前
在本地建立git仓库
git
OYangxf19 小时前
Git Rollback, Reset and Restore的使用
git
AIMath~19 小时前
git管理代码仓库的工具
git
techdashen1 天前
为 Agent 重新设计的 Git:Cloudflare Artifacts 是什么,怎么工作的
git
赖在沙发上的熊1 天前
Git多仓库协作中和并冲突问题:“不相关历史合并”+“问跟踪文件冲突”
git
风若飞1 天前
▎ 适用于完全没有 Git 经验的新手
git
时空自由民.1 天前
git rebase简介
git