岚天逸见

git之tag操作

  • 查看本地有哪些 tags
# git tag -l
v0.0.3
v0.0.5
v0.0.6
  • 查看远程有哪些 tags
# 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

命令格式:

git ls-remote --tags <remote_name>

将 <remote_name> 替换为远程仓库的名称,通常为 origin 。

  • 删除本地的 tag
git tag -d v0.0.6

命令格式:

git tag -d <tag_name>
  • 删除远程的 tag
git push origin :refs/tags/v0.0.6

命令格式:

git push <remote_name> :refs/tags/<tag_name>

将 <remote_name> 替换为远程仓库的名称,通常为 origin 。

posted on   岚天逸见  阅读(8)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
历史上的今天:
2023-05-11 Flink MySQL CDC connector 使用注意事项
2023-05-11 parquet is not a Parquet file (length is too low: 0)

导航

统计信息

点击右上角即可分享
微信分享提示