{"id":18784,"date":"2024-11-19T14:15:45","date_gmt":"2024-11-19T06:15:45","guid":{"rendered":"https:\/\/fwq.ai\/blog\/18784\/"},"modified":"2024-11-19T14:15:45","modified_gmt":"2024-11-19T06:15:45","slug":"github%e4%b8%ad%e6%80%8e%e4%b9%88%e9%83%a8%e7%bd%b2vue%e9%a1%b9%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/18784\/","title":{"rendered":"github\u4e2d\u600e\u4e48\u90e8\u7f72vue\u9879\u76ee"},"content":{"rendered":"<p>\u5982\u679c\u4f60\u5df2\u7ecf\u5728 github \u4e0a\u521b\u5efa\u4e86\u4e00\u4e2a\u4ed3\u5e93\uff0c\u5e76\u4e14\u60f3\u8981\u7528 vue \u6765\u6784\u5efa\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u90a3\u4e48\u63a5\u4e0b\u6765\u7684\u6b65\u9aa4\u5c06\u4f1a\u544a\u8bc9\u4f60\u5982\u4f55\u914d\u7f6e\u4f60\u7684\u9879\u76ee\uff0c\u4ee5\u4fbf\u4f60\u53ef\u4ee5\u8ba9\u5b83\u4e0e github \u517c\u5bb9\u3002<\/p>\n<p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u4f7f\u7528 Vue CLI \u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u9879\u76ee\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>vue create my-project<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a my-project \u7684\u65b0\u9879\u76ee\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u5305\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>cd my-project\nnpm install<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u542f\u52a8\u9879\u76ee\uff1a<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<pre>npm run serve<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u4e3a\u8fd9\u4e2a\u9879\u76ee\u521b\u5efa\u4e00\u4e2a GitHub \u4ed3\u5e93\u3002\u6253\u5f00 https:\/\/github.com \u5e76\u767b\u5f55\u4f60\u7684\u8d26\u6237\u3002\u5355\u51fb\u53f3\u4e0a\u89d2\u7684\u52a0\u53f7\uff0c\u7136\u540e\u9009\u62e9\u201cNew repository\u201d\u3002<\/p>\n<p>\u5728\u65b0\u7684\u4ed3\u5e93\u9875\u9762\u4e2d\uff0c\u4f60\u9700\u8981\u8bbe\u7f6e\u540d\u79f0\u548c\u63cf\u8ff0\u3002\u4f60\u53ef\u4ee5\u9009\u62e9\u5c06\u4ed3\u5e93\u8bbe\u7f6e\u4e3a\u516c\u5171\u6216\u79c1\u6709\u3002\u6700\u540e\uff0c\u70b9\u51fb\u201cCreate repository\u201d\u6309\u94ae\u3002\u4f60\u7684\u65b0\u4ed3\u5e93\u73b0\u5728\u5df2\u7ecf\u521b\u5efa\u6210\u529f\u4e86\u3002<\/p>\n<p>\u73b0\u5728\uff0c\u4f60\u9700\u8981\u5c06\u4f60\u7684\u672c\u5730\u9879\u76ee\u4e0e\u65b0\u7684 GitHub \u4ed3\u5e93\u5173\u8054\u8d77\u6765\u3002\u5728\u7ec8\u7aef\u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>git remote add origin https:\/\/github.com\/username\/my-project.git<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728\u547d\u4ee4\u4e2d\uff0c\u5c06 username \u66ff\u6362\u4e3a\u4f60\u7684 GitHub \u7528\u6237\u540d\uff0c\u5c06 my-project \u66ff\u6362\u4e3a\u4f60\u7684\u65b0\u4ed3\u5e93\u540d\u79f0\u3002<\/p>\n<p>\u7136\u540e\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u521b\u5efa\u7b2c\u4e00\u4e2a\u63d0\u4ea4\uff1a<\/p>\n<pre>git add .\ngit commit -m \"first commit\"\ngit push -u origin master<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u628a\u4f60\u7684\u672c\u5730\u4ee3\u7801\u63a8\u9001\u5230 GitHub \u4ed3\u5e93\u4e2d\u3002<\/p>\n<p>\u73b0\u5728\uff0c\u4f60\u7684\u9879\u76ee\u5df2\u7ecf\u4e0a\u4f20\u5230 GitHub\u3002\u4f60\u53ef\u4ee5\u968f\u65f6\u5728\u672c\u5730\u8fdb\u884c\u66f4\u6539\uff0c\u7136\u540e\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u5c06\u66f4\u6539\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93\uff1a<\/p>\n<pre>git add .\ngit commit -m \"my changes\"\ngit push<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5982\u679c\u4f60\u60f3\u8981\u4ece GitHub \u4e0b\u8f7d\u4e00\u4e2a\u73b0\u6709\u7684\u9879\u76ee\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>git clone https:\/\/github.com\/username\/my-project.git<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728\u547d\u4ee4\u4e2d\uff0c\u5c06 username \u66ff\u6362\u4e3a GitHub \u7528\u6237\u540d\uff0c\u5c06 my-project \u66ff\u6362\u4e3a\u4ed3\u5e93\u540d\u79f0\u3002<\/p>\n<p>\u603b\u7ed3\u4e00\u4e0b\uff0c\u4e0a\u8ff0\u6b65\u9aa4\u6307\u5bfc\u4e86\u5982\u4f55\u4f7f\u7528 Vue CLI \u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\uff0c\u5e76\u5c06\u5176\u4e0a\u4f20\u5230 GitHub \u4ed3\u5e93\u3002\u540c\u65f6\uff0c\u4e5f\u7b80\u8981\u8bf4\u660e\u4e86\u5982\u4f55\u4ece GitHub \u4e0b\u8f7d\u73b0\u6709\u7684\u9879\u76ee\u3002\u5982\u679c\u4f60\u9700\u8981\u8fdb\u884c\u66f4\u6df1\u5165\u7684\u64cd\u4f5c\uff0c\u53ef\u4ee5\u53c2\u8003 Vue CLI \u6216 Git \u5b98\u65b9\u6587\u6863\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fgithub\u4e2d\u600e\u4e48\u90e8\u7f72vue\u9879\u76ee\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>\u5982\u679c\u4f60\u5df2\u7ecf\u5728 github \u4e0a\u521b\u5efa\u4e86\u4e00\u4e2a\u4ed3\u5e93\uff0c\u5e76\u4e14\u60f3\u8981\u7528 vue \u6765\u6784\u5efa\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u90a3\u4e48\u63a5\u4e0b\u6765\u7684\u6b65\u9aa4\u5c06\u4f1a\u544a\u8bc9\u4f60\u5982\u4f55\u914d\u7f6e\u4f60\u7684\u9879\u76ee\uff0c\u4ee5\u4fbf\u4f60\u53ef\u4ee5\u8ba9\u5b83\u4e0e github \u517c\u5bb9\u3002 \u9996\u5148\uff0c\u4f60\u9700\u8981\u4f7f\u7528 Vue CLI \u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u9879\u76ee\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a vue create my-project \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a my-project \u7684\u65b0\u9879\u76ee\u3002 \u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u5305\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a cd my-project npm install \u767b\u5f55\u540e\u590d\u5236 \u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u542f\u52a8\u9879\u76ee\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b npm run serve \u767b\u5f55\u540e\u590d\u5236 \u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u4e3a\u8fd9\u4e2a\u9879\u76ee\u521b\u5efa\u4e00\u4e2a GitHub \u4ed3\u5e93\u3002\u6253\u5f00 https:\/\/github.com \u5e76\u767b\u5f55\u4f60\u7684\u8d26\u6237\u3002\u5355\u51fb\u53f3\u4e0a\u89d2\u7684\u52a0\u53f7\uff0c\u7136\u540e\u9009\u62e9\u201cNew repository\u201d\u3002 \u5728\u65b0\u7684\u4ed3\u5e93\u9875\u9762\u4e2d\uff0c\u4f60\u9700\u8981\u8bbe\u7f6e\u540d\u79f0\u548c\u63cf\u8ff0\u3002\u4f60\u53ef\u4ee5\u9009\u62e9\u5c06\u4ed3\u5e93\u8bbe\u7f6e\u4e3a\u516c\u5171\u6216\u79c1\u6709\u3002\u6700\u540e\uff0c\u70b9\u51fb\u201cCreate repository\u201d\u6309\u94ae\u3002\u4f60\u7684\u65b0\u4ed3\u5e93\u73b0\u5728\u5df2\u7ecf\u521b\u5efa\u6210\u529f\u4e86\u3002 \u73b0\u5728\uff0c\u4f60\u9700\u8981\u5c06\u4f60\u7684\u672c\u5730\u9879\u76ee\u4e0e\u65b0\u7684 GitHub \u4ed3\u5e93\u5173\u8054\u8d77\u6765\u3002\u5728\u7ec8\u7aef\u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a git remote add origin https:\/\/github.com\/username\/my-project.git \u767b\u5f55\u540e\u590d\u5236 \u5728\u547d\u4ee4\u4e2d\uff0c\u5c06 username \u66ff\u6362\u4e3a\u4f60\u7684 GitHub \u7528\u6237\u540d\uff0c\u5c06 my-project \u66ff\u6362\u4e3a\u4f60\u7684\u65b0\u4ed3\u5e93\u540d\u79f0\u3002 \u7136\u540e\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u521b\u5efa\u7b2c\u4e00\u4e2a\u63d0\u4ea4\uff1a [&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-18784","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18784","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=18784"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18784\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=18784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=18784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=18784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}