{"id":986,"date":"2019-10-25T10:08:03","date_gmt":"2019-10-25T02:08:03","guid":{"rendered":"https:\/\/jqnets.com\/blog\/?p=986"},"modified":"2019-10-25T10:08:03","modified_gmt":"2019-10-25T02:08:03","slug":"git-%e5%ad%b8%e7%bf%92%e6%89%8b%e5%86%8a13-remote%ef%bc%9agit-tag","status":"publish","type":"post","link":"https:\/\/jqnets.com\/blog\/git-%e5%ad%b8%e7%bf%92%e6%89%8b%e5%86%8a13-remote%ef%bc%9agit-tag\/","title":{"rendered":"Git \u5b78\u7fd2\u624b\u518a#13 Remote\uff1aGit Tag"},"content":{"rendered":"<p>\u4eca\u5929\u6211\u5011\u4f86\u8aaa\u8aaa Git Tag\uff0c\u6211\u5011\u53ef\u4ee5\u5728\u5c08\u6848\u88e1\u9762\u65b0\u589e Tag\uff0c\u65b9\u4fbf\u60a8\u7d00\u9304\u8a0a\u606f\uff0c\u4e5f\u53ef\u4ee5\u900f\u904e tag \u4f86\u9032\u884c clone \u4e0b\u8f09\u5c08\u6848\uff0c\u4f8b\u5982 v1.0\u3001v1.1 \u7b49 tag\uff0c\u4e5f\u53ef\u4ee5\u7576\u6210\u81ea\u5df1\u4e00\u500b\u91cc\u7a0b\u57e4\u7684\u5099\u8a3b\u7b49\u7b49\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u56e0\u70ba\u64cd\u4f5c\u65b9\u5f0f\u57fa\u672c\u4e0a\u548c branch \u76f8\u540c\u96f7\u540c\uff0c\u56e0\u6b64\u5728\u9019\u908a\u5c31\u63d0\u4f9b\u6307\u4ee4\u4f9b\u5927\u5bb6\u53c3\u8003\u5373\u53ef\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #008080;\"><strong>\u25a0\u00a0Git Tag\u00a0\u6307\u4ee4<\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #339966;\">\u25c6\u00a0Tag \u5217\u8868<\/span><\/p>\n<pre class=\"lang:default decode:true\"># \u6307\u4ee4\u76f8\u95dc\u67e5\u8a62\r\ngit tag -h\r\n\r\n# \u53d6\u5f97\u9060\u7aef\u7684 tag\r\ngit fetch -t\r\n\r\n# tag \u5217\u8868\r\ngit tag -l<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #339966;\">\u25c6\u00a0\u5275\u5efa tag \u8207 push<\/span><\/p>\n<pre class=\"lang:default decode:true\"># \u672c\u5730\u65b0\u589e tag\r\ngit tag 1.1\r\n\r\n# \u63a8\u9001 tag\r\ngit push --tag<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #339966;\">\u25c6\u00a0\u522a\u9664 tag<\/span><\/p>\n<pre class=\"lang:default decode:true\"># \u672c\u5730\u522a\u9664 tag\r\ngit tag -d 1.1\r\n\r\n# \u522a\u9664\u9060\u7aef tag\r\ngit push origin :refs\/tags\/v1.1\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u200c<\/p>\n<p><span style=\"color: #008000;\">\u25c6\u00a0Clone tag<\/span><\/p>\n<pre class=\"lang:default decode:true \">git clone --branch &lt;tag_name&gt; &lt;repo_url&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u6211\u5011\u4f86\u8aaa\u8aaa Git Tag\uff0c\u6211\u5011\u53ef\u4ee5\u5728\u5c08\u6848\u88e1\u9762\u65b0\u589e Tag\uff0c\u65b9\u4fbf\u60a8\u7d00\u9304\u8a0a\u606f\uff0c\u4e5f\u53ef\u4ee5\u900f\u904e tag \u4f86\u9032\u884c clone \u4e0b\u8f09\u5c08\u6848\uff0c\u4f8b\u5982 v1.0\u3001v1.1 \u7b49 tag\uff0c\u4e5f\u53ef\u4ee5\u7576\u6210\u81ea\u5df1\u4e00\u500b\u91cc\u7a0b\u57e4\u7684\u5099\u8a3b\u7b49\u7b49\u3002 &nbsp; \u56e0\u70ba\u64cd\u4f5c\u65b9\u5f0f\u57fa\u672c\u4e0a\u548c branch \u76f8\u540c\u96f7\u540c\uff0c\u56e0\u6b64\u5728\u9019\u908a\u5c31\u63d0\u4f9b\u6307\u4ee4\u4f9b\u5927\u5bb6\u53c3\u8003\u5373\u53ef\u3002 &nbsp; \u25a0\u00a0Git Tag\u00a0\u6307\u4ee4 &nbsp; \u25c6\u00a0Tag \u5217\u8868 # \u6307\u4ee4\u76f8\u95dc\u67e5\u8a62 git tag -h # \u53d6\u5f97\u9060\u7aef\u7684 tag git fetch -t # tag \u5217\u8868 git tag  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[3,251],"tags":[271,305,309,273],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6rhcT-fU","jetpack-related-posts":[],"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/posts\/986"}],"collection":[{"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/comments?post=986"}],"version-history":[{"count":2,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/posts\/986\/revisions"}],"predecessor-version":[{"id":988,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/posts\/986\/revisions\/988"}],"wp:attachment":[{"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/media?parent=986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/categories?post=986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/tags?post=986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}