{"id":894,"date":"2019-09-27T09:57:33","date_gmt":"2019-09-27T01:57:33","guid":{"rendered":"https:\/\/jqnets.com\/blog\/?p=894"},"modified":"2019-09-27T09:58:36","modified_gmt":"2019-09-27T01:58:36","slug":"git-%e5%ad%b8%e7%bf%92%e6%89%8b%e5%86%8a3-%e5%88%9d%e5%a7%8b%e5%8c%96%ef%bc%9acreate-an-empty-repository","status":"publish","type":"post","link":"https:\/\/jqnets.com\/blog\/git-%e5%ad%b8%e7%bf%92%e6%89%8b%e5%86%8a3-%e5%88%9d%e5%a7%8b%e5%8c%96%ef%bc%9acreate-an-empty-repository\/","title":{"rendered":"Git \u5b78\u7fd2\u624b\u518a#3 \u521d\u59cb\u5316\uff1aCreate an empty Repository"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>\u4eca\u5929\u6211\u5011\u5c31\u4f86\u958b\u59cb\u521d\u59cb\u5316 git \u4ee3\u78bc\u5009\u5eab\uff0c\u4e00\u822c\u4f86\u8aaa\uff0c\u6211\u5011\u53ea\u6709\u5728\u5c08\u6848\u7684\u4e00\u958b\u59cb\uff0c\u624d\u6703\u5efa\u7acb\u4e00\u500b\u65b0\u7684 git \u8cc7\u6599\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #006400;\"><strong>\u25a0\u00a0git init \u521d\u59cb\u5316\u4ee3\u78bc\u5009\u5eab<\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #008080;\">\u25c6 git init<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>\u6211\u5011\u5148\u4f86\u521d\u59cb\u5316\uff0c\u5efa\u7acb\u4e00\u500b git \u5009\u5eab\u3002<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:default decode:true \">git init testgit<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u5efa\u7acb\u5b8c\u6210\u4e4b\u5f8c\uff0c\u6703\u7522\u751f\u4e00\u500b .git \u7684\u8cc7\u6599\u593e<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #008080;\">\u25c6 .git\/config<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>\u6211\u5011\u53ef\u4ee5\u900f\u904e find \u6307\u4ee4\uff0c\u4f86\u67e5\u770b\u6240\u6709\u7684\u6a94\u6848\u7d50\u69cb\u3002<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:default decode:true \">cd testgit\r\n\r\nfind .\/<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:default decode:true \">.\/\r\n\r\n.\/\/.git\r\n\r\n.\/\/.git\/config\r\n\r\n.\/\/.git\/objects\r\n\r\n.\/\/.git\/objects\/pack\r\n\r\n.\/\/.git\/objects\/info\r\n\r\n.\/\/.git\/HEAD\r\n\r\n.\/\/.git\/info\r\n\r\n.\/\/.git\/info\/exclude\r\n\r\n.\/\/.git\/description\r\n\r\n.\/\/.git\/hooks\r\n\r\n.\/\/.git\/hooks\/commit-msg.sample\r\n\r\n.\/\/.git\/hooks\/pre-rebase.sample\r\n\r\n.\/\/.git\/hooks\/pre-commit.sample\r\n\r\n.\/\/.git\/hooks\/applypatch-msg.sample\r\n\r\n.\/\/.git\/hooks\/fsmonitor-watchman.sample\r\n\r\n.\/\/.git\/hooks\/pre-receive.sample\r\n\r\n.\/\/.git\/hooks\/prepare-commit-msg.sample\r\n\r\n.\/\/.git\/hooks\/post-update.sample\r\n\r\n.\/\/.git\/hooks\/pre-applypatch.sample\r\n\r\n.\/\/.git\/hooks\/pre-push.sample\r\n\r\n.\/\/.git\/hooks\/update.sample\r\n\r\n.\/\/.git\/refs\r\n\r\n.\/\/.git\/refs\/heads\r\n\r\n.\/\/.git\/refs\/tags\r\n\r\n.\/\/.git\/branches<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u5230\u9019\u908a\uff0c\u6211\u5011\u7684\u521d\u59cb\u5316\u5c31\u5df2\u7d93\u6210\u529f\u4e86\uff0c\u4e0b\u4e00\u7bc7\u4f86\u8b1b\u300c\u72c0\u614b\u63d0\u4ea4\u8207\u65e5\u8a8c\uff1a Repository Change\u300d\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u4eca\u5929\u6211\u5011\u5c31\u4f86\u958b\u59cb\u521d\u59cb\u5316 git \u4ee3\u78bc\u5009\u5eab\uff0c\u4e00\u822c\u4f86\u8aaa\uff0c\u6211\u5011\u53ea\u6709\u5728\u5c08\u6848\u7684\u4e00\u958b\u59cb\uff0c\u624d\u6703\u5efa\u7acb\u4e00\u500b\u65b0\u7684 git \u8cc7\u6599\u3002 &nbsp; \u25a0\u00a0git init \u521d\u59cb\u5316\u4ee3\u78bc\u5009\u5eab &nbsp; \u25c6 git init &nbsp; \u6211\u5011\u5148\u4f86\u521d\u59cb\u5316\uff0c\u5efa\u7acb\u4e00\u500b git \u5009\u5eab\u3002 &nbsp; git init testgit &nbsp; &nbsp; \u5efa\u7acb\u5b8c\u6210\u4e4b\u5f8c\uff0c\u6703\u7522\u751f\u4e00\u500b .git \u7684\u8cc7\u6599\u593e &nbsp; &nbsp; \u25c6 .git\/config &nbsp; \u6211\u5011\u53ef\u4ee5\u900f\u904e find \u6307\u4ee4\uff0c\u4f86\u67e5\u770b\u6240\u6709 [&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":[1],"tags":[271,273,276],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6rhcT-eq","jetpack-related-posts":[],"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/posts\/894"}],"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=894"}],"version-history":[{"count":2,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/posts\/894\/revisions"}],"predecessor-version":[{"id":896,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/posts\/894\/revisions\/896"}],"wp:attachment":[{"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/media?parent=894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/categories?post=894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/tags?post=894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}