{"id":3802,"date":"2020-11-25T11:04:10","date_gmt":"2020-11-25T02:04:10","guid":{"rendered":"https:\/\/www.chihayafuru.jp\/tech\/?p=3802"},"modified":"2026-05-15T13:06:36","modified_gmt":"2026-05-15T04:06:36","slug":"git-%e3%82%bf%e3%82%b0%e3%81%ae%e4%bd%bf%e3%81%84%e3%81%8b%e3%81%9f","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/3802","title":{"rendered":"[git] \u30bf\u30b0\u306e\u4f7f\u3044\u304b\u305f"},"content":{"rendered":"<h3>1. \u30bf\u30b0\u306e\u4f5c\u6210\u65b9\u6cd5<\/h3>\n<h4>1.1. \u300e\u7c21\u6613\u30bf\u30b0\uff08\u30b3\u30e1\u30f3\u30c8\u306a\u3057\uff09\u300f\u306e\u4f5c\u6210\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git tag \u30bf\u30b0\u540d<\/pre>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git tag v.1.10<\/pre>\n<ul>\n<li>\u4e0a\u8a18\u306e\u3088\u3046\u306b\u30b3\u30df\u30c3\u30c8\u3092\u6307\u5b9a\u3057\u306a\u3044\u3068\u304d\u306f\u3001<strong>HEAD<\/strong> \uff08\u30ab\u30ec\u30f3\u30c8\u30d6\u30e9\u30f3\u30c1\u306e\u6700\u65b0\u30b3\u30df\u30c3\u30c8\uff09\u306b\u30bf\u30b0\u3092\u4ed8\u4e0e\u3059\u308b\u3002<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h4>1.2. \u300e\u30bf\u30b0\uff08\u30b3\u30e1\u30f3\u30c8\u3042\u308a\uff09\u300f\u306e\u4f5c\u6210\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git tag -a \u30bf\u30b0\u540d -m &quot;\u30b3\u30e1\u30f3\u30c8&quot;<\/pre>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git tag -a  v.1.10 -m &quot;\u30ea\u30ea\u30fc\u30b9 xxx&quot;<\/pre>\n<h3>2. \u30bf\u30b0\u306epush\u65b9\u6cd5<\/h3>\n<ul>\n<li>\u30bf\u30b0\u3092\u4f5c\u6210\u3057\u305f\u3060\u3051\u3067\u306f\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u53cd\u6620\uff08push\uff09\u3055\u308c\u306a\u3044\u3002<\/li>\n<\/ul>\n<h4>2.1. \u30bf\u30b0\u306e\u500b\u5225\u306epush\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git push \u30ea\u30dd\u30b8\u30c8\u30ea\u540d \u30bf\u30b0\u540d<\/pre>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git push origin v1.10<\/pre>\n<h4>2.2. \u8907\u6570\u30bf\u30b0\u306e\u4e00\u62ecpush\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git push origin --tags<\/pre>\n<h3>3. \u30bf\u30b0\u306efetch\u65b9\u6cd5<\/h3>\n<h4>3.1. \u8907\u6570\u30bf\u30b0\u306e\u4e00\u62ecfetch\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git fetch --tags<\/pre>\n<h4>3.2. \u8907\u6570refs(branch\u3068tag)\u306e\u4e00\u62ecfetch\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git fetch --all<\/pre>\n<h3>4. \u30bf\u30b0\u306e\u524a\u9664\u65b9\u6cd5<\/h3>\n<h4>4.1. \u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30bf\u30b0\u306e\u524a\u9664\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git tag -d \u30bf\u30b0\u540d<\/pre>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git tag -d v1.10<\/pre>\n<h4>4.2. \u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30bf\u30b0\u306e\u4e00\u62ec\u524a\u9664\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git tag | xargs git tag -d<\/pre>\n<h4>4.3. \u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30bf\u30b0\u306e\u524a\u9664\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git push \u30ea\u30dd\u30b8\u30c8\u30ea\u540d :\u30bf\u30b0\u540d<\/pre>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git push origin :v1.10<\/pre>\n<h4>4.4. \u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30bf\u30b0\u306e\u4e00\u62ec\u524a\u9664\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git tag | xargs git push --delete origin<\/pre>\n<pre class=\"lang:default highlight:0 decode:true \" >$ git tag | awk {'print \":\" $1'} | xargs git push origin<\/pre>\n<hr>\n<h3>\u95a2\u9023\u30ea\u30f3\u30af<\/h3>\n<ul>\n<li><a href=\"\/tech\/index.php\/archives\/368\">[git] \u30bf\u30b0\u306e\u30ea\u30cd\u30fc\u30e0\u65b9\u6cd5<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1. \u30bf\u30b0\u306e\u4f5c\u6210\u65b9\u6cd5 1.1. \u300e\u7c21\u6613\u30bf\u30b0\uff08\u30b3\u30e1\u30f3\u30c8\u306a\u3057\uff09\u300f\u306e\u4f5c\u6210\u65b9\u6cd5 $ git tag \u30bf\u30b0\u540d $ git tag v.1.10 \u4e0a\u8a18\u306e\u3088\u3046\u306b\u30b3\u30df\u30c3\u30c8\u3092\u6307\u5b9a\u3057\u306a\u3044\u3068\u304d\u306f\u3001HEAD \uff08\u30ab\u30ec\u30f3\u30c8\u30d6\u30e9\u30f3\u30c1\u306e\u6700\u65b0\u30b3\u30df\u30c3\u30c8\uff09\u306b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[2],"class_list":["post-3802","post","type-post","status-publish","format-standard","hentry","category-memo","tag-git"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/3802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=3802"}],"version-history":[{"count":12,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/3802\/revisions"}],"predecessor-version":[{"id":8748,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/3802\/revisions\/8748"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=3802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=3802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=3802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}