{"id":19945,"date":"2024-11-19T16:14:31","date_gmt":"2024-11-19T08:14:31","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19945\/"},"modified":"2024-11-19T16:14:31","modified_gmt":"2024-11-19T08:14:31","slug":"%e5%a6%82%e4%bd%95%e4%b8%8a%e4%bc%a0%e4%bb%a3%e7%a0%81%e5%88%b0github","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19945\/","title":{"rendered":"\u5982\u4f55\u4e0a\u4f20\u4ee3\u7801\u5230GitHub"},"content":{"rendered":"<p>\u5728\u7a0b\u5e8f\u5458\u7684\u4e16\u754c\u91cc\uff0cgithub \u65e0\u7591\u662f\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u5e73\u53f0\uff0c\u800c\u5982\u4f55\u4e0a\u4f20\u81ea\u5df1\u7684\u4ee3\u7801\u5e76\u5206\u4eab\u7ed9\u4ed6\u4eba\u5219\u662f\u5176\u4e2d\u5fc5\u987b\u638c\u63e1\u7684\u6280\u80fd\u4e4b\u4e00\u3002\u5bf9\u4e8e\u521d\u5b66\u8005\u6765\u8bf4\uff0c\u4e0a\u4f20\u4ee3\u7801\u53ef\u80fd\u4f1a\u89c9\u5f97\u6bd4\u8f83\u56f0\u96be\u3002\u6240\u4ee5\uff0c\u672c\u6587\u5c06\u4e3a\u5927\u5bb6\u4ecb\u7ecd\u5982\u4f55\u4e0a\u4f20\u4ee3\u7801\u5230 github\u3002<\/p>\n<p>\u4e00\u3001\u6ce8\u518cGitHub\u8d26\u53f7<\/p>\n<p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u6ce8\u518c\u4e00\u4e2a GitHub \u8d26\u53f7\u3002\u5982\u679c\u4f60\u5df2\u7ecf\u6709\u4e86\u8d26\u53f7\uff0c\u53ef\u4ee5\u76f4\u63a5\u8df3\u8fc7\u8fd9\u4e00\u6b65\u3002\u6ce8\u518c\u65f6\uff0c\u9700\u8981\u8f93\u5165\u7528\u6237\u540d\u3001\u90ae\u7bb1\u5730\u5740\u548c\u5bc6\u7801\u7b49\u4fe1\u606f\uff0c\u540c\u610f\u6761\u6b3e\u540e\u5373\u53ef\u70b9\u51fb \u201cSign up for GitHub\u201d \u5b8c\u6210\u6ce8\u518c\u3002<\/p>\n<p>\u4e8c\u3001\u521b\u5efa\u65b0\u7684\u4ed3\u5e93<\/p>\n<p>\u6ce8\u518c\u5b8c\u6210\u540e\uff0c\u5728 GitHub \u9875\u9762\u4e0a\u53f3\u4e0a\u89d2\u7684 \u201c+\u201d \u53f7\u4e2d\u70b9\u51fb \u201cNew repository\u201d \u6765\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u4ed3\u5e93\u3002\u5728\u5f39\u51fa\u7684\u65b0\u7a97\u53e3\u4e2d\uff0c\u8f93\u5165\u4f60\u7684\u4ed3\u5e93\u540d\u79f0\uff0c\u5e76\u6dfb\u52a0\u4e00\u4e2a\u7b80\u77ed\u7684\u63cf\u8ff0\uff0c\u9009\u62e9\u516c\u5f00\u6216\u79c1\u6709\uff0c\u52fe\u9009 \u201cInitialize this repository with a README\u201d \u5e76\u9009\u62e9 \u201cMIT License\u201d \uff0c\u6700\u540e\u70b9\u51fb \u201cCreate repository\u201d \u5373\u53ef\u5b8c\u6210\u521b\u5efa\u3002<\/p>\n<p>\u4e09\u3001\u4e0a\u4f20\u672c\u5730\u4ee3\u7801\u5230 GitHub<\/p>\n<p>\u5728\u521b\u5efa\u5b8c\u6210\u4ed3\u5e93\u540e\uff0c\u63a5\u4e0b\u6765\u5c31\u662f\u4e0a\u4f20\u672c\u5730\u4ee3\u7801\u5230 GitHub \u4e0a\u3002\u5148\u5728\u672c\u5730\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\u4f5c\u4e3a\u672c\u5730 Git \u4ed3\u5e93\uff0c\u7136\u540e\u4f7f\u7528 Git \u6dfb\u52a0\u6587\u4ef6\u5e76\u63d0\u4ea4\u3002<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u8fdb\u5165\u672c\u5730\u4ed3\u5e93\u6587\u4ef6\u5939\u4e2d\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u6dfb\u52a0\u4ee3\u7801\uff1a<\/p>\n<pre>git init # \u521d\u59cb\u5316\u672c\u5730 Git \u4ed3\u5e93\ngit add . # \u6dfb\u52a0\u6240\u6709\u6587\u4ef6\u81f3 Git \u4ed3\u5e93\u4e2d\ngit commit -m \"Initial commit\" # \u63d0\u4ea4\u4fee\u6539\uff0c\u5e76\u6dfb\u52a0\u8bf4\u660e<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b64\u65f6\uff0c\u672c\u5730\u4ed3\u5e93\u5c31\u5df2\u7ecf\u51c6\u5907\u597d\u4e86\uff0c\u63a5\u4e0b\u6765\u9700\u8981\u4e0e GitHub \u4e0a\u7684\u4ed3\u5e93\u8fde\u63a5\u3002\u5728\u4ed3\u5e93\u9875\u9762\u4e2d\uff0c\u627e\u5230\u4ed3\u5e93\u5730\u5740\uff0c\u5982 https:\/\/github.com\/username\/repository.git\u3002<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u4e2d\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5c06\u672c\u5730\u4ed3\u5e93\u63a8\u9001\u5230 GitHub\uff1a<\/p>\n<pre>git remote add origin https:\/\/github.com\/username\/repository.git # \u5173\u8054\u672c\u5730\u4ed3\u5e93\u4e0e GitHub \u4e0a\u7684\u4ed3\u5e93\ngit branch -M main # \u5c06\u672c\u5730\u4ed3\u5e93\u7684\u5206\u652f\u91cd\u547d\u540d\u4e3a main \ngit push -u origin main # \u5c06\u672c\u5730\u4ed3\u5e93\u63a8\u9001\u5230 GitHub\uff0c\u7b2c\u4e00\u6b21\u6267\u884c\u9700\u8981\u52a0\u4e0a \u201c-u\u201d \u53c2\u6570<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u56db\u3001\u66f4\u65b0\u4ee3\u7801<\/p>\n<p>\u5728\u672c\u5730\u5bf9\u4ee3\u7801\u8fdb\u884c\u4fee\u6539\u540e\uff0c\u9700\u8981\u5c06\u4ee3\u7801\u540c\u6b65\u5230 GitHub \u4e0a\uff0c\u53ea\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\uff1a<\/p>\n<pre>git add . # \u5c06\u4fee\u6539\u7684\u6587\u4ef6\u6dfb\u52a0\u5230 Git \u4ed3\u5e93\u4e2d\ngit commit -m \"Update code\" # \u63d0\u4ea4\u4fee\u6539\uff0c\u5e76\u6dfb\u52a0\u8bf4\u660e\ngit push origin main # \u5c06\u672c\u5730\u4fee\u6539\u7684\u4ee3\u7801\u63a8\u9001\u5230 GitHub<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u603b\u4e4b\uff0c\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u6211\u4eec\u53ef\u4ee5\u4e86\u89e3\u5230 GitHub \u7684\u57fa\u672c\u4f7f\u7528\u65b9\u6cd5\uff0c\u4ece\u6ce8\u518c\u8d26\u53f7\u5230\u521b\u5efa\u3001\u4e0a\u4f20\u3001\u66f4\u65b0\u4ed3\u5e93\u7684\u5168\u90e8\u8fc7\u7a0b\u3002\u5f53\u7136\uff0c GitHub \u8fd8\u6709\u5f88\u591a\u5176\u4ed6\u7684\u529f\u80fd\uff0c\u5982\u534f\u540c\u5f00\u53d1\u3001\u5206\u652f\u7ba1\u7406\u7b49\uff0c\u8fd9\u4e9b\u529f\u80fd\u6709\u5f85\u8fdb\u4e00\u6b65\u63a2\u7d22\u3002\u5e0c\u671b\u5bf9\u7a0b\u5e8f\u5458\u7684\u5c0f\u4f19\u4f34\u4eec\u80fd\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u4e0a\u4f20\u4ee3\u7801\u5230GitHub\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u7a0b\u5e8f\u5458\u7684\u4e16\u754c\u91cc\uff0cgithub \u65e0\u7591\u662f\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u5e73\u53f0\uff0c\u800c\u5982\u4f55\u4e0a\u4f20\u81ea\u5df1\u7684\u4ee3\u7801\u5e76\u5206\u4eab\u7ed9\u4ed6\u4eba\u5219\u662f\u5176\u4e2d\u5fc5\u987b\u638c\u63e1\u7684\u6280\u80fd\u4e4b\u4e00\u3002\u5bf9\u4e8e\u521d\u5b66\u8005\u6765\u8bf4\uff0c\u4e0a\u4f20\u4ee3\u7801\u53ef\u80fd\u4f1a\u89c9\u5f97\u6bd4\u8f83\u56f0\u96be\u3002\u6240\u4ee5\uff0c\u672c\u6587\u5c06\u4e3a\u5927\u5bb6\u4ecb\u7ecd\u5982\u4f55\u4e0a\u4f20\u4ee3\u7801\u5230 github\u3002 \u4e00\u3001\u6ce8\u518cGitHub\u8d26\u53f7 \u9996\u5148\uff0c\u4f60\u9700\u8981\u6ce8\u518c\u4e00\u4e2a GitHub \u8d26\u53f7\u3002\u5982\u679c\u4f60\u5df2\u7ecf\u6709\u4e86\u8d26\u53f7\uff0c\u53ef\u4ee5\u76f4\u63a5\u8df3\u8fc7\u8fd9\u4e00\u6b65\u3002\u6ce8\u518c\u65f6\uff0c\u9700\u8981\u8f93\u5165\u7528\u6237\u540d\u3001\u90ae\u7bb1\u5730\u5740\u548c\u5bc6\u7801\u7b49\u4fe1\u606f\uff0c\u540c\u610f\u6761\u6b3e\u540e\u5373\u53ef\u70b9\u51fb \u201cSign up for GitHub\u201d \u5b8c\u6210\u6ce8\u518c\u3002 \u4e8c\u3001\u521b\u5efa\u65b0\u7684\u4ed3\u5e93 \u6ce8\u518c\u5b8c\u6210\u540e\uff0c\u5728 GitHub \u9875\u9762\u4e0a\u53f3\u4e0a\u89d2\u7684 \u201c+\u201d \u53f7\u4e2d\u70b9\u51fb \u201cNew repository\u201d \u6765\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u4ed3\u5e93\u3002\u5728\u5f39\u51fa\u7684\u65b0\u7a97\u53e3\u4e2d\uff0c\u8f93\u5165\u4f60\u7684\u4ed3\u5e93\u540d\u79f0\uff0c\u5e76\u6dfb\u52a0\u4e00\u4e2a\u7b80\u77ed\u7684\u63cf\u8ff0\uff0c\u9009\u62e9\u516c\u5f00\u6216\u79c1\u6709\uff0c\u52fe\u9009 \u201cInitialize this repository with a README\u201d \u5e76\u9009\u62e9 \u201cMIT License\u201d \uff0c\u6700\u540e\u70b9\u51fb \u201cCreate repository\u201d \u5373\u53ef\u5b8c\u6210\u521b\u5efa\u3002 \u4e09\u3001\u4e0a\u4f20\u672c\u5730\u4ee3\u7801\u5230 GitHub \u5728\u521b\u5efa\u5b8c\u6210\u4ed3\u5e93\u540e\uff0c\u63a5\u4e0b\u6765\u5c31\u662f\u4e0a\u4f20\u672c\u5730\u4ee3\u7801\u5230 GitHub \u4e0a\u3002\u5148\u5728\u672c\u5730\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\u4f5c\u4e3a\u672c\u5730 Git \u4ed3\u5e93\uff0c\u7136\u540e\u4f7f\u7528 Git \u6dfb\u52a0\u6587\u4ef6\u5e76\u63d0\u4ea4\u3002 \u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u8fdb\u5165\u672c\u5730\u4ed3\u5e93\u6587\u4ef6\u5939\u4e2d\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u6dfb\u52a0\u4ee3\u7801\uff1a git init # \u521d\u59cb\u5316\u672c\u5730 Git \u4ed3\u5e93 git add . # \u6dfb\u52a0\u6240\u6709\u6587\u4ef6\u81f3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-19945","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=19945"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19945\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}