当前位置: 首页 > news >正文

Git | tag相关命令

语法命令

git tag -h
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]<tagname> [<head>]or: git tag -d <tagname>...or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>][--format=<format>] [--merged <commit>] [--no-merged <commit>] [<pattern>...]or: git tag -v [--format=<format>] <tagname>...-l, --list            list tag names-n[<n>]               print <n> lines of each tag message-d, --delete          delete tags-v, --verify          verify tagsTag creation options-a, --annotate        annotated tag, needs a message-m, --message <message>tag message-F, --file <file>     read message from file-e, --edit            force edit of tag message-s, --sign            annotated and GPG-signed tag--cleanup <mode>      how to strip spaces and #comments from message-u, --local-user <key-id>use another key to sign the tag-f, --force           replace the tag if exists--create-reflog       create a reflogTag listing options--column[=<style>]    show tag list in columns--contains <commit>   print only tags that contain the commit--no-contains <commit>print only tags that don't contain the commit--merged <commit>     print only tags that are merged--no-merged <commit>  print only tags that are not merged--sort <key>          field name to sort on--points-at <object>  print only tags of the object--format <format>     format to use for the output--color[=<when>]      respect format colors-i, --ignore-case     sorting and filtering are case insensitive

常用命令

创建tag

  1. 创建本地tag
git tag -a <tag_name> <commit_id>
  1. 推送tag到远程
git push --tags origin <remote_branch_name>

删除tag

  1. 删除本地tag
git tag -d <tag_name>
  1. 远程进行删除tag
git push origin :refs/tags/<tag_name>
http://www.lryc.cn/news/272820.html

相关文章:

  • 【Java期末】学生成绩管理系统
  • 顶顶通呼叫中心中间件通过队列外呼拨打另一个sip并且放音(mod_cti基于FreeSWITCH)
  • SQL Server从0到1——报错注入
  • 【python高级用法】线程
  • 分布式高级知识点
  • Linux 命令之 dpkg 的简单使用
  • Ubuntu20.04服务器使用教程(安装教程、常用命令、故障排查)持续更新中.....
  • 访问学者J1签证的申请流程
  • 51单片机(STC8)-- GPIO输入输出
  • 【实用安装教程】在win系统下制作Mac OS镜像启动U盘
  • 职场唠嗑-国家教学
  • 【温故而知新】JavaScript数据结构详解
  • matlab如何标定相机内外参和畸变参数
  • 【卫星科普】什么是农业一号卫星和农业二号卫星?
  • imgaug库指南(一):从入门到精通的【图像增强】之旅
  • vue封装基础input组件(添加防抖功能)
  • 小程序一次性订阅消息(消息通知):java服务端实现
  • 百度自由DIY小程序源码:PHP+MySQL组合开发 带完整的搭建教程
  • Vue中的选项式 API 和组合式 API,两者有什么区别
  • Linux下误删除后的恢复操作测试之extundelete工具使用
  • table表格中使用el-popover 无效问题解决
  • c++类全面讲解
  • 使用Python和Pygame库创建简单的的彩球效果
  • 第2课 使用FFmpeg读取rtmp流并用openCV显示视频
  • 【中小型企业网络实战案例 七】配置限速
  • Hive实战:实现数据去重
  • 客户满意度调查常用的ChatGPT通用提示词模板
  • Android--Jetpack--Paging详解
  • Unity 基于UDP实现本地时间与网络时间校验 防客户端修改日期作弊
  • ArduPilot开源代码之MatekSys Optical Flow 3901-L0X