{"id":1436,"date":"2017-03-30T19:02:59","date_gmt":"2017-03-30T10:02:59","guid":{"rendered":"http:\/\/www.chihayafuru.jp\/tech\/?p=1436"},"modified":"2025-09-20T07:28:09","modified_gmt":"2025-09-19T22:28:09","slug":"git%e3%81%ae%e3%83%aa%e3%83%a2%e3%83%bc%e3%83%88%e3%83%aa%e3%83%9d%e3%82%b8%e3%83%88%e3%83%aa%e3%81%a8%e3%81%ae%e5%90%8c%e6%9c%9f%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/1436","title":{"rendered":"[git] \u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u64cd\u4f5c"},"content":{"rendered":"<h3>\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u4f5c\u6210\u3057\u305f\u30d6\u30e9\u30f3\u30c1\u3092\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3078PUSH\u3059\u308b<\/h3>\n<pre class=\"lang:sh highlight:0 decode:true \" >$ git checkout -b branch_xxx\r\n\r\n$ git push origin branch_xxx<\/pre>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b <code>-u<\/code> (upstream) \u3092\u6307\u5b9a\u3059\u308c\u3070\u3001\u6b21\u56de\u304b\u3089\u306f <code>$ git push<\/code> \u306e\u307f\u3067\u30d7\u30c3\u30b7\u30e5\u5148\u306e\u6307\u5b9a\u3092\u7701\u7565\u3067\u304d\u308b\u3002<\/p>\n<pre class=\"lang:sh highlight:0 decode:true \" >$ git branch -u origin branch_xxx<\/pre>\n<pre class=\"lang:sh highlight:0 decode:true \" >$ git push -u origin branch_xxx<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u524a\u9664\u3057\u305f\u30d6\u30e9\u30f3\u30c1\u3092\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u3082\u524a\u9664\u3059\u308b<\/h3>\n<pre class=\"lang:sh highlight:0 decode:true \" >$ git branch -d branch_xxx\r\n\r\n$ git push origin :branch_xxx<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u4f5c\u6210\u3055\u308c\u305f\u30d6\u30e9\u30f3\u30c1\u3092\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3059\u308b<\/h3>\n<pre class=\"lang:sh highlight:0 decode:true \" >$ git fetch\r\n\r\n$ git branch -r\r\n\r\n$ git checkout -b branch_xxx origin\/branch_xxx<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u524a\u9664\u3055\u308c\u305f\u30d6\u30e9\u30f3\u30c1\u3092\u6697\u9ed9\u7684\u306b\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u3082\u524a\u9664\u3059\u308b<\/h3>\n<pre class=\"lang:sh highlight:0 decode:true \" >$ git fetch --prune\r\nFrom https:\/\/xxx.xxx.com\/xxx\r\n- [deleted]           (none)     -&gt; origin\/5.0.2\r\n- [deleted]           (none)     -&gt; origin\/FIX_XXX_BUG<\/pre>\n<p>&nbsp;<\/p>\n<h3>4. References<\/h3>\n<ul>\n<li><a href=\"\/tech\/index.php\/archives\/1132\">[git] \u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u64cd\u4f5c\u65b9\u6cd5<\/a><\/li>\n<li><a href=\"\/tech\/index.php\/archives\/3030\">[git] \u8907\u6570\u306e\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u5bfe\u5fdc<\/a><\/li>\n<li><a href=\"\/tech\/index.php\/archives\/8121\">[git] \u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3059\u308b<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u4f5c\u6210\u3057\u305f\u30d6\u30e9\u30f3\u30c1\u3092\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3078PUSH\u3059\u308b $ git checkout -b branch_xxx $ git push origin branch_xxx<\/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-1436","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\/1436","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=1436"}],"version-history":[{"count":13,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1436\/revisions"}],"predecessor-version":[{"id":8127,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1436\/revisions\/8127"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=1436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=1436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=1436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}