text: (window.webpackJsonp=window.webpackJsonp||[]).push([[244],{803:function(t,v,s){"use strict";s.r(v);var a=s(6),_=Object(a.a)({},(function(){var t=this,v=t.$createElement,s=t._self._c||v;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h2",{attrs:{id:"步骤"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#步骤"}},[t._v("#")]),t._v(" 步骤")]),t._v(" "),s("p",[t._v("Tag用于某一时间点的版本做标记，常用于版本发布。")]),t._v(" "),s("p",[t._v("1、"),s("code",[t._v('git tag -a v0.0.1 -m "v0.0.1发布"')])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://imgconvert.csdnimg.cn/aHR0cHM6Ly9ub3RlLnlvdWRhby5jb20veXdzL3B1YmxpYy9yZXNvdXJjZS9lZTczNDY5NzMzOTUzZmY0NWUwZTY3YzAxYTQyNTE0Yy8xMjY4M0I1ODY5Q0Y0NjNCOTU3Q0FBRTM3QTExRjNEMA?x-oss-process=image/format,png",alt:"在这里插入图片描述"}})]),t._v(" "),s("p",[t._v("2、"),s("code",[t._v("git push origin v0.0.1")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://imgconvert.csdnimg.cn/aHR0cHM6Ly9ub3RlLnlvdWRhby5jb20veXdzL3B1YmxpYy9yZXNvdXJjZS9lZTczNDY5NzMzOTUzZmY0NWUwZTY3YzAxYTQyNTE0Yy9CMzVFQjk4RTIwNkY0Mjk3OTZBMkM4QzVBN0VCNDYyNA?x-oss-process=image/format,png",alt:"在这里插入图片描述"}})]),t._v(" "),s("p",[t._v("3、查看github项目的Tags")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://imgconvert.csdnimg.cn/aHR0cHM6Ly9ub3RlLnlvdWRhby5jb20veXdzL3B1YmxpYy9yZXNvdXJjZS9lZTczNDY5NzMzOTUzZmY0NWUwZTY3YzAxYTQyNTE0Yy81MkM5RUE1NjY4NUQ0REEzQjZDRjREQjQzN0M4RjhGRQ?x-oss-process=image/format,png",alt:"在这里插入图片描述"}})]),t._v(" "),s("h2",{attrs:{id:"tag相关命令"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#tag相关命令"}},[t._v("#")]),t._v(" tag相关命令")]),t._v(" "),s("p",[t._v("1、在控制台打印出当前仓库的所有标签："),s("code",[t._v("git tag")])]),t._v(" "),s("p",[t._v("2、搜索符合模式的标签："),s("code",[t._v("git tag -l 'v0.0.*'")])]),t._v(" "),s("p",[t._v("3、创建附注标签："),s("code",[t._v('git tag -a v0.0.1 -m "v0.0.1发布"')])]),t._v(" "),s("p",[t._v("4、删除标签："),s("code",[t._v("git tag -d v0.0.1")])]),t._v(" "),s("p",[t._v("5、查看标签的版本信息："),s("code",[t._v("git show v0.0.1")])]),t._v(" "),s("p",[t._v("6、指向打"),s("code",[t._v("v0.0.2")]),t._v("标签时的代码状态："),s("code",[t._v("git checkout v0.0.2")])]),t._v(" "),s("p",[t._v("7、将"),s("code",[t._v("v0.0.1")]),t._v("标签提交到git服务器："),s("code",[t._v("git push origin v0.0.1")])]),t._v(" "),s("p",[t._v("8、将本地所有标签一次性提交到git服务器："),s("code",[t._v("git push origin –tags")])])])}),[],!1,null,null,null);v.default=_.exports}}]);