{"id":1283,"date":"2017-01-12T14:02:13","date_gmt":"2017-01-12T05:02:13","guid":{"rendered":"http:\/\/www.chihayafuru.jp\/tech\/?p=1283"},"modified":"2018-05-19T02:57:47","modified_gmt":"2018-05-18T17:57:47","slug":"git-submodule%e3%81%ae%e6%9b%b4%e6%96%b0%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/1283","title":{"rendered":"[git] submodule\u306e\u66f4\u65b0\u65b9\u6cd5"},"content":{"rendered":"<h1>1. (new commits) \u3068\u8868\u793a\u3055\u308c\u308b<\/h1>\n<h2>1-1. git status \u306e\u4f8b<\/h2>\n<pre class=\"lang:sh highlight:0 decode:true \" >$ git status\r\nOn branch develop\r\nYour branch is up-to-date with 'origin\/develop'.\r\nChanges not staged for commit:\r\n  (use \"git add &lt;file&gt;...\" to update what will be committed)\r\n  (use \"git checkout -- &lt;file&gt;...\" to discard changes in working directory)\r\n\r\n\tmodified:   mySubModule (new commits)\r\n\r\nno changes added to commit (use \"git add\" and\/or \"git commit -a\")<\/pre>\n<p><!--more--><\/p>\n<h2>1-2. \u539f\u56e0<\/h2>\n<p>\u81ea\u5206\u4ee5\u5916\u306e\u8ab0\u304b\u304csubmodule\u3092\u66f4\u65b0\u3057\u305f\u3002(\u89aamodule\u304b\u3089\u53c2\u7167\u3057\u3066\u3044\u308bsubmodule\u306ecommit\u3092\u5909\u66f4\u3057\u305f)<\/p>\n<h2>1-3. \u89e3\u6d88\u65b9\u6cd5<\/h2>\n<p>\u8ab0\u304b\u304c\u66f4\u65b0\u3057\u305fsubmodule\u306e\u30b3\u30df\u30c3\u30c8\u3092\u53d6\u308a\u8fbc\u3080(update\u3059\u308b)<\/p>\n<pre class=\"lang:sh highlight:0 decode:true \" >$ git submodule update<\/pre>\n<p>&nbsp;<\/p>\n<h1>2. (modified content) \u3068\u8868\u793a\u3055\u308c\u308b<\/h1>\n<h2>2-1. git status \u306e\u4f8b<\/h2>\n<pre class=\"lang:sh highlight:0 decode:true \" >$ git status\r\nOn branch develop\r\nYour branch is up-to-date with 'origin\/develop'.\r\nChanges not staged for commit:\r\n  (use \"git add &lt;file&gt;...\" to update what will be committed)\r\n  (use \"git checkout -- &lt;file&gt;...\" to discard changes in working directory)\r\n  (commit or discard the untracked or modified content in submodules)\r\n\r\n\tmodified:   mySubModule (modified content)<\/pre>\n<h2>2-2. \u539f\u56e0<\/h2>\n<p>\u81ea\u5206\u304csubmodule\u3092\u66f4\u65b0\u3057\u305f\u3002<\/p>\n<h2>2-3. \u89e3\u6d88\u65b9\u6cd5<\/h2>\n<h3>2-3-1. submodule\u306e\u66f4\u65b0\u3092\u53d6\u308a\u6d88\u3059<\/h2>\n<pre class=\"lang:sh highlight:0 decode:true \" >$ cd .\/submodules\/mySubModule\r\n$ git checkout .<\/pre>\n<h3>2-3-2. submodule\u306e\u66f4\u65b0\u3092\u30b3\u30df\u30c3\u30c8\u3059\u308b<\/h2>\n<pre class=\"lang:sh highlight:0 decode:true \" >$ cd .\/submodules\/mySubModule\r\n$ git add .\r\n$ git commit<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. (new commits) \u3068\u8868\u793a\u3055\u308c\u308b 1-1. git status \u306e\u4f8b $ git status On branch develop Your branch is up-to-date with &#8216;orig [&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-1283","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\/1283","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=1283"}],"version-history":[{"count":8,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1283\/revisions"}],"predecessor-version":[{"id":2384,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1283\/revisions\/2384"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=1283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=1283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=1283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}