- 查看本地有哪些 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 。