本地创建带附注标签

$ git tag -a <版本号> -m "<备注信息>"

本地创建轻量级标签

$ git tag <版本号>-light

本地对指定commit创建标签

$ git tag -a <版本号> <SHA> -m "<备注信息>"

本地删除标签

$ git tag -d <版本号>

删除远程指定版本的标签

$ git push origin --delete <版本号>
$ git push origin :refs/tags/<版本号> //老版本git使用

推送本地所有标签到远程

$ git push origin --tags

推送本地指定版本的标签到远程

$ git push origin <版本号>

查看本地标签

$ git tag

查看远程标签

$ git show-ref --tag 

 查看本地对应tag状态

$git checkout <版本号>

参考:

  【1】https://blog.csdn.net/b735098742/article/details/78935748

  【2】https://www.cnblogs.com/jidi/p/10105201.html

相关文章:

  • 2022-12-23
  • 2021-05-21
  • 2021-11-23
  • 2022-01-22
  • 2021-12-25
  • 2021-05-23
  • 2022-12-23
  • 2021-07-31
猜你喜欢
  • 2022-12-23
  • 2021-06-21
  • 2021-10-25
  • 2021-06-13
  • 2021-08-30
  • 2022-12-23
相关资源
相似解决方案