Git 如何管理标签命令(tag)

1.查看本地仓库tag

--1.查看本地仓库tag
User@DESKTOP-2NRT2ST MINGW64 /e/GITROOT/STARiBOSS/STARiBOSS-5GCA (gw_frontend_master)
$ git tag
1stBossUpgrade
V10.0.1_20220224_test
V10.0.1_20220301_test
tag-gw+frontend-V1.0.12-230625
tag-gw_frontend-23.08.29
tag-gw_frontend-23.09.25
tag-gw_frontend-23.10.24
tag-gw_frontend-V1.0.11-230625
tag-gw_frontend-V1.0.15-230725
tag-gw_frontend-V1.0.17-230829
tag-gw_frontend-V1.0.19-230925
tag-gw_frontend-V1.0.20-231024
tag-gw_frontend-V1.0.21
tag-gw_frontend_V1.0.31-240425
test-137-231023
test-138-231023
test-139-231023

2.删除本地仓库tag

--2.删除本地仓库tag
User@DESKTOP-2NRT2ST MINGW64 /e/GITROOT/STARiBOSS/STARiBOSS-5GCA (gw_frontend_master)
$ git tag -d tag-gw_frontend-23.08.29
Deleted tag 'tag-gw_frontend-23.08.29' (was 42980209)

3.删除远程仓库tag

--删除远程仓库tag

User@DESKTOP-2NRT2ST MINGW64 /e/GITROOT/STARiBOSS/STARiBOSS-5GCA (gw_frontend_master)
$ git push origin --delete tag-gw_frontend-23.08.29
To https://gitlab.startimes.me/old-boss-refactor/sms.git
 - [deleted]           tag-gw_frontend-23.08.29

4.更新本地仓库tag


--更新
User@DESKTOP-2NRT2ST MINGW64 /e/GITROOT/STARiBOSS/STARiBOSS-5GCA (gw_frontend_master)
$ get fetch --tags
bash: get: command not found


User@DESKTOP-2NRT2ST MINGW64 /e/GITROOT/STARiBOSS/STARiBOSS-5GCA (gw_frontend_master)
$ git pull
Already up to date.

-- 查看已经删除
User@DESKTOP-2NRT2ST MINGW64 /e/GITROOT/STARiBOSS/STARiBOSS-5GCA (gw_frontend_master)
$ git tag -l
1stBossUpgrade
V10.0.1_20220224_test
V10.0.1_20220301_test
tag-gw+frontend-V1.0.12-230625
tag-gw_frontend-23.09.25
tag-gw_frontend-23.10.24
tag-gw_frontend-V1.0.11-230625
tag-gw_frontend-V1.0.15-230725
tag-gw_frontend-V1.0.17-230829
tag-gw_frontend-V1.0.19-230925
tag-gw_frontend-V1.0.20-231024
tag-gw_frontend-V1.0.21
tag-gw_frontend_V1.0.31-240425
test-137-231023
test-138-231023
test-139-231023

5.重命名仓库tag

重命名tag实际上是以指定tag创建1条新的tag记录, 然后删除旧tag标签,例如

User@DESKTOP-2NRT2ST MINGW64 /e/GITROOT/STARiBOSS/STARiBOSS-5GCA (gw_frontend_master)
$ git tag
1stBossUpgrade
V10.0.1_20220224_test
V10.0.1_20220301_test
tag-gw+frontend-V1.0.12-230625
tag-gw_frontend-V1.0.11-230625
tag-gw_frontend-V1.0.15-230725
tag-gw_frontend-V1.0.17-230829
tag-gw_frontend-V1.0.19-230925
tag-gw_frontend-V1.0.20-231024
tag-gw_frontend-V1.0.21
tag-gw_frontend_V1.0.31-240425
test-137-231023
test-138-231023
test-139-231023


User@DESKTOP-2NRT2ST MINGW64 /e/GITROOT/STARiBOSS/STARiBOSS-5GCA (gw_frontend_master)
$ git tag tag-gw_frontend-V1.0.21-231108 tag-gw_frontend-V1.0.21

User@DESKTOP-2NRT2ST MINGW64 /e/GITROOT/STARiBOSS/STARiBOSS-5GCA (gw_frontend_master)
$ git tag -l -n
1stBossUpgrade  备份第一版boss升级内容
V10.0.1_20220224_test 迁移需要缓存的dao
V10.0.1_20220301_test Merge remote-tracking branch 'origin/master'
tag-gw+frontend-V1.0.12-230625 解决JSON转换小写问题
tag-gw_frontend-V1.0.11-230625 解决JSON转换小写问题
tag-gw_frontend-V1.0.15-230725 S15 commit
tag-gw_frontend-V1.0.17-230829 tag:物联网1期+播控平台
tag-gw_frontend-V1.0.19-230925 主应用(GW5G)Sprint 16
tag-gw_frontend-V1.0.20-231024 S20发布标签
tag-gw_frontend-V1.0.21 S21
tag-gw_frontend-V1.0.21-231108 S21
tag-gw_frontend_V1.0.31-240425 Sprint31
test-137-231023 BUILDER:
test-138-231023 BUILDER:
test-139-231023 BUILDER:

6.推送tag到远程仓库

User@DESKTOP-2NRT2ST MINGW64 /e/gitroot/STARIBOSS/STARSMS (liaoning_release)
$ git tag
8.2.3-56-240402
8.2.3-73-240411
8.2.3.31-74-240429


User@DESKTOP-2NRT2ST MINGW64 /e/gitroot/STARIBOSS/STARSMS (liaoning_release)
$

User@DESKTOP-2NRT2ST MINGW64 /e/gitroot/STARIBOSS/STARSMS (liaoning_release)
$ git push origin 8.2.3.31-74-240429
Total 0 (delta 0), reused 0 (delta 0)
To https://gitlab.startimes.me/gn-boss-main/starsms.git
 * [new tag]             8.2.3.31-74-240429 -> 8.2.3.31-74-240429


上一篇:IDEA中GIT常用操作


  • 6
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

=PNZ=BeijingL

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值