{"id":4675,"date":"2017-02-18T13:16:42","date_gmt":"2017-02-18T05:16:42","guid":{"rendered":"https:\/\/www.icocean.com\/blog\/?p=4675"},"modified":"2017-02-18T13:16:42","modified_gmt":"2017-02-18T05:16:42","slug":"%e4%bf%ae%e6%94%b9submodule%e7%9a%84url","status":"publish","type":"post","link":"https:\/\/www.icocean.com\/blog\/?p=4675","title":{"rendered":"\u4fee\u6539submodule\u7684url"},"content":{"rendered":"<p>Update .gitmodules with the path to the new repository<br \/>\nRemove the corresponding line from the &#8220;.git\/config&#8221; file<br \/>\nDelete the corresponding directory in the &#8220;.git\/modules\/external&#8221; directory<br \/>\nDelete the checked out submodule directory itself (unsure if this is necessary)<br \/>\nRun git submodule init and git submodule update<br \/>\nMake sure the checked out submodule is at the correct commit, and commit that, since it&#8217;s likely that the hash will be different<br \/>\nAfter doing all that, everything is in the state I would expect.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update .gitmodules with the path to the new repository  <a href='https:\/\/www.icocean.com\/blog\/?p=4675' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[3939],"class_list":["post-4675","post","type-post","status-publish","format-standard","hentry","category-4","tag-git","category-4-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4675"}],"version-history":[{"count":1,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4675\/revisions"}],"predecessor-version":[{"id":4676,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4675\/revisions\/4676"}],"wp:attachment":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}