{"id":18973,"date":"2024-11-19T16:02:33","date_gmt":"2024-11-19T08:02:33","guid":{"rendered":"https:\/\/fwq.ai\/blog\/18973\/"},"modified":"2024-11-19T16:02:33","modified_gmt":"2024-11-19T08:02:33","slug":"%e4%b8%8a%e4%bc%a0%e4%bb%a3%e7%a0%81%e5%88%b0github%e4%b8%8a%e7%9a%84%e8%af%a6%e7%bb%86%e6%ad%a5%e9%aa%a4","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/18973\/","title":{"rendered":"\u4e0a\u4f20\u4ee3\u7801\u5230GitHub\u4e0a\u7684\u8be6\u7ec6\u6b65\u9aa4"},"content":{"rendered":"<p>\u4e0a\u4f20\u5230github\u662f\u4e00\u4e2a\u975e\u5e38\u5e38\u89c1\u7684\u5f00\u6e90\u64cd\u4f5c\uff0c\u56e0\u4e3agithub\u662f\u4e00\u4e2a\u5f00\u6e90\u793e\u533a\uff0c\u4f60\u53ef\u4ee5\u5c06\u4f60\u7684\u4ee3\u7801\u5206\u4eab\u7ed9\u5176\u4ed6\u7684\u5f00\u53d1\u8005\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u7b80\u5355\u4ecb\u7ecd\u4e0a\u4f20\u5230github\u4e0a\u7684\u6b65\u9aa4\u3002<\/p>\n<p>\u7b2c\u4e00\u6b65\uff1a\u5411GitHub\u6ce8\u518c\u8d26\u53f7<\/p>\n<p>\u5728\u63d0\u4ea4\u4ee3\u7801\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u5148\u5728GitHub\u4e0a\u6ce8\u518c\u8d26\u53f7\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728GitHub\u7f51\u7ad9\u4e0a\u8f93\u5165\u4f60\u7684\u90ae\u7bb1\u5730\u5740\u548c\u4e00\u4e2a\u5bc6\u7801\u5373\u53ef\u3002\u6ce8\u610f\uff0c\u4e3a\u4e86\u66f4\u597d\u5730\u4fdd\u62a4\u4f60\u7684GitHub\u8d26\u6237\uff0c\u5efa\u8bae\u4f7f\u7528\u53cc\u91cd\u8ba4\u8bc1\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65\uff1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Repository<\/p>\n<p>\u5728GitHub\u8d26\u6237\u9875\u9762\u4e0a\uff0c\u4f60\u5c06\u770b\u5230\u4e00\u4e2a\u52a0\u53f7\uff08+\uff09\u7684\u6309\u94ae\u3002\u70b9\u51fb\u5b83\uff0c\u9009\u62e9\u201cNew repository\u201d\uff08\u65b0\u5efa\u5b58\u50a8\u5e93\uff09\u3002<\/p>\n<p>\u4e4b\u540e\uff0c\u586b\u5199\u5b58\u50a8\u5e93\u7684\u4fe1\u606f\uff1a\u5305\u62ec\u5b58\u50a8\u5e93\u540d\u79f0\u3001\u5b58\u50a8\u5e93\u63cf\u8ff0\u3001\u5b58\u50a8\u5e93\u6743\u9650\u3001\u662f\u5426\u521b\u5efa\u4e00\u4e2aREADME\u7b49\u3002<\/p>\n<p>\u5728\u8fd9\u4e00\u6b65\u91cc\uff0c\u4f60\u9700\u8981\u628a\u4e00\u4e2a\u201cgit clone\u201d\u94fe\u63a5\u590d\u5236\u4e0b\u6765\uff0c\u8fd9\u4e2a\u94fe\u63a5\u5c06\u7528\u6765\u4f5c\u4e3a\u4f60\u63d0\u4ea4\u4ee3\u7801\u7684\u5730\u5740\u3002<\/p>\n<p>\u7b2c\u4e09\u6b65\uff1a\u5b89\u88c5Git\u5ba2\u6237\u7aef<\/p>\n<p>\u4f60\u9700\u8981\u5b89\u88c5Git\u5ba2\u6237\u7aef\u6765\u64cd\u4f5c\u4e0eGitHub\u76f8\u5173\u7684\u547d\u4ee4\u3002\u5177\u4f53\u5b89\u88c5\u65b9\u6cd5\u53ef\u4ee5\u81ea\u884c\u641c\u7d22\uff0c\u56e0\u4e3a\u4e0d\u540c\u7684\u7cfb\u7edf\u5b89\u88c5\u65b9\u6cd5\u53ef\u80fd\u6709\u6240\u4e0d\u540c\u3002<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u201cgit &#8211;version\u201d\u547d\u4ee4\u68c0\u67e5\u662f\u5426\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<p>\u7b2c\u56db\u6b65\uff1a\u547d\u4ee4\u884c\u6dfb\u52a0\u548c\u63d0\u4ea4\u4ee3\u7801<\/p>\n<p>1.\u6253\u5f00Git Bash\uff0c\u8fdb\u5165\u4f60\u60f3\u8981\u5c06\u4ee3\u7801\u5b58\u653e\u7684\u672c\u5730\u6587\u4ef6\u5939\u3002<\/p>\n<p>2.\u8f93\u5165\u201cgit init\u201d\u547d\u4ee4\uff0c\u65b0\u5efa\u4e00\u4e2a\u4ed3\u5e93\uff0c\u5e76\u8fdb\u884c\u521d\u59cb\u5316\u3002<\/p>\n<p>3.\u5c06\u4f60\u7684\u4ee3\u7801\u6dfb\u52a0\u5230Git\u4ed3\u5e93\u91cc\u3002\u53ef\u4ee5\u8f93\u5165\u201cgit add .\u201d\u547d\u4ee4\uff0c\u5c06\u6240\u6709\u7684\u6587\u4ef6\u6dfb\u52a0\u5230\u4ed3\u5e93\u91cc\uff1b\u6216\u8005\u8f93\u5165\u201cgit add \u6587\u4ef6\u540d\u201d\u547d\u4ee4\uff0c\u4ec5\u4ec5\u5c06\u4e00\u4e2a\u6587\u4ef6\u6dfb\u52a0\u5230\u4ed3\u5e93\u91cc\u3002<\/p>\n<p>4.\u63d0\u4ea4\u4f60\u7684\u4ee3\u7801\u3002\u8f93\u5165\u201cgit commit -m &#8220;\u63d0\u4ea4\u8bf4\u660e&#8221;\u201d\u547d\u4ee4\uff0c\u5c06\u4fee\u6539\u63d0\u4ea4\u5230\u4ed3\u5e93\u91cc\u3002\u8bf4\u660e\u53ef\u4ee5\u662f\u4efb\u4f55\u5185\u5bb9\uff0c\u7528\u6765\u8bf4\u660e\u63d0\u4ea4\u7684\u5185\u5bb9\u3002<\/p>\n<p>5.\u5c06\u672c\u5730\u7684\u4ed3\u5e93\u4e0eGitHub\u670d\u52a1\u5668\u4e0a\u7684\u4ed3\u5e93\u8fdb\u884c\u5173\u8054\u3002\u8f93\u5165\u201cgit remote add origin \u4f60\u590d\u5236\u7684\u4ed3\u5e93\u5730\u5740\u201d\u547d\u4ee4\uff0c\u5c06\u672c\u5730\u7684\u4ed3\u5e93\u5730\u5740\u7ed1\u5b9a\u5230Github\u4e0a\u3002<\/p>\n<p>6.\u63d0\u4ea4\u4f60\u7684\u4ee3\u7801\u3002\u8f93\u5165\u201cgit push -u origin master\u201d\u547d\u4ee4\uff0c\u5c06\u4f60\u7684\u4ee3\u7801\u63a8\u9001\u5230GitHub\u4e0a\u3002\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u65b0\u5efa\u4e00\u4e2a\u8fdc\u7a0b\u7684\u201cmaster\u201d\u5206\u652f\uff0c\u5e76\u5c06\u4ee3\u7801\u63d0\u4ea4\u5230\u8fd9\u4e2a\u5206\u652f\u91cc\u3002<\/p>\n<p>\u7b2c\u4e94\u6b65\uff1a\u68c0\u67e5\u662f\u5426\u6210\u529f<\/p>\n<p>\u6253\u5f00GitHub\u7f51\u7ad9\uff0c\u5237\u65b0\u521a\u521a\u65b0\u5efa\u7684\u4ed3\u5e93\u9875\u9762\uff0c\u5c31\u53ef\u4ee5\u770b\u5230\u521a\u521a\u63a8\u9001\u7684\u6587\u4ef6\u4e86\u3002<\/p>\n<p>\u603b\u7ed3<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e0a\u4f20\u4ee3\u7801\u5230GitHub\u4e0a\u7684\u8be6\u7ec6\u6b65\u9aa4\u3002\u5982\u679c\u4f60\u6709\u4e00\u4e9b\u4e0d\u9519\u7684\u9879\u76ee\u8d44\u6e90\uff0c\u6b63\u5f0f\u4e0a\u4f20\u5b83\u4eec\u5230GitHub\u4f9b\u5927\u5bb6\u4e0b\u8f7d\u4f7f\u7528\uff0c\u5c06\u4f1a\u7ed9\u4f60\u7684\u5f00\u6e90\u56e2\u961f\u5e26\u6765\u66f4\u591a\u7684\u826f\u597d\u53cd\u9988\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u5e2e\u52a9\u5230\u4f60\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e0a\u4f20\u4ee3\u7801\u5230GitHub\u4e0a\u7684\u8be6\u7ec6\u6b65\u9aa4\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>\u4e0a\u4f20\u5230github\u662f\u4e00\u4e2a\u975e\u5e38\u5e38\u89c1\u7684\u5f00\u6e90\u64cd\u4f5c\uff0c\u56e0\u4e3agithub\u662f\u4e00\u4e2a\u5f00\u6e90\u793e\u533a\uff0c\u4f60\u53ef\u4ee5\u5c06\u4f60\u7684\u4ee3\u7801\u5206\u4eab\u7ed9\u5176\u4ed6\u7684\u5f00\u53d1\u8005\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u7b80\u5355\u4ecb\u7ecd\u4e0a\u4f20\u5230github\u4e0a\u7684\u6b65\u9aa4\u3002 \u7b2c\u4e00\u6b65\uff1a\u5411GitHub\u6ce8\u518c\u8d26\u53f7 \u5728\u63d0\u4ea4\u4ee3\u7801\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u5148\u5728GitHub\u4e0a\u6ce8\u518c\u8d26\u53f7\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728GitHub\u7f51\u7ad9\u4e0a\u8f93\u5165\u4f60\u7684\u90ae\u7bb1\u5730\u5740\u548c\u4e00\u4e2a\u5bc6\u7801\u5373\u53ef\u3002\u6ce8\u610f\uff0c\u4e3a\u4e86\u66f4\u597d\u5730\u4fdd\u62a4\u4f60\u7684GitHub\u8d26\u6237\uff0c\u5efa\u8bae\u4f7f\u7528\u53cc\u91cd\u8ba4\u8bc1\u3002 \u7b2c\u4e8c\u6b65\uff1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Repository \u5728GitHub\u8d26\u6237\u9875\u9762\u4e0a\uff0c\u4f60\u5c06\u770b\u5230\u4e00\u4e2a\u52a0\u53f7\uff08+\uff09\u7684\u6309\u94ae\u3002\u70b9\u51fb\u5b83\uff0c\u9009\u62e9\u201cNew repository\u201d\uff08\u65b0\u5efa\u5b58\u50a8\u5e93\uff09\u3002 \u4e4b\u540e\uff0c\u586b\u5199\u5b58\u50a8\u5e93\u7684\u4fe1\u606f\uff1a\u5305\u62ec\u5b58\u50a8\u5e93\u540d\u79f0\u3001\u5b58\u50a8\u5e93\u63cf\u8ff0\u3001\u5b58\u50a8\u5e93\u6743\u9650\u3001\u662f\u5426\u521b\u5efa\u4e00\u4e2aREADME\u7b49\u3002 \u5728\u8fd9\u4e00\u6b65\u91cc\uff0c\u4f60\u9700\u8981\u628a\u4e00\u4e2a\u201cgit clone\u201d\u94fe\u63a5\u590d\u5236\u4e0b\u6765\uff0c\u8fd9\u4e2a\u94fe\u63a5\u5c06\u7528\u6765\u4f5c\u4e3a\u4f60\u63d0\u4ea4\u4ee3\u7801\u7684\u5730\u5740\u3002 \u7b2c\u4e09\u6b65\uff1a\u5b89\u88c5Git\u5ba2\u6237\u7aef \u4f60\u9700\u8981\u5b89\u88c5Git\u5ba2\u6237\u7aef\u6765\u64cd\u4f5c\u4e0eGitHub\u76f8\u5173\u7684\u547d\u4ee4\u3002\u5177\u4f53\u5b89\u88c5\u65b9\u6cd5\u53ef\u4ee5\u81ea\u884c\u641c\u7d22\uff0c\u56e0\u4e3a\u4e0d\u540c\u7684\u7cfb\u7edf\u5b89\u88c5\u65b9\u6cd5\u53ef\u80fd\u6709\u6240\u4e0d\u540c\u3002 \u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u201cgit &#8211;version\u201d\u547d\u4ee4\u68c0\u67e5\u662f\u5426\u5b89\u88c5\u6210\u529f\u3002 \u7b2c\u56db\u6b65\uff1a\u547d\u4ee4\u884c\u6dfb\u52a0\u548c\u63d0\u4ea4\u4ee3\u7801 1.\u6253\u5f00Git Bash\uff0c\u8fdb\u5165\u4f60\u60f3\u8981\u5c06\u4ee3\u7801\u5b58\u653e\u7684\u672c\u5730\u6587\u4ef6\u5939\u3002 2.\u8f93\u5165\u201cgit init\u201d\u547d\u4ee4\uff0c\u65b0\u5efa\u4e00\u4e2a\u4ed3\u5e93\uff0c\u5e76\u8fdb\u884c\u521d\u59cb\u5316\u3002 3.\u5c06\u4f60\u7684\u4ee3\u7801\u6dfb\u52a0\u5230Git\u4ed3\u5e93\u91cc\u3002\u53ef\u4ee5\u8f93\u5165\u201cgit add .\u201d\u547d\u4ee4\uff0c\u5c06\u6240\u6709\u7684\u6587\u4ef6\u6dfb\u52a0\u5230\u4ed3\u5e93\u91cc\uff1b\u6216\u8005\u8f93\u5165\u201cgit add \u6587\u4ef6\u540d\u201d\u547d\u4ee4\uff0c\u4ec5\u4ec5\u5c06\u4e00\u4e2a\u6587\u4ef6\u6dfb\u52a0\u5230\u4ed3\u5e93\u91cc\u3002 4.\u63d0\u4ea4\u4f60\u7684\u4ee3\u7801\u3002\u8f93\u5165\u201cgit commit -m &#8220;\u63d0\u4ea4\u8bf4\u660e&#8221;\u201d\u547d\u4ee4\uff0c\u5c06\u4fee\u6539\u63d0\u4ea4\u5230\u4ed3\u5e93\u91cc\u3002\u8bf4\u660e\u53ef\u4ee5\u662f\u4efb\u4f55\u5185\u5bb9\uff0c\u7528\u6765\u8bf4\u660e\u63d0\u4ea4\u7684\u5185\u5bb9\u3002 5.\u5c06\u672c\u5730\u7684\u4ed3\u5e93\u4e0eGitHub\u670d\u52a1\u5668\u4e0a\u7684\u4ed3\u5e93\u8fdb\u884c\u5173\u8054\u3002\u8f93\u5165\u201cgit remote add origin \u4f60\u590d\u5236\u7684\u4ed3\u5e93\u5730\u5740\u201d\u547d\u4ee4\uff0c\u5c06\u672c\u5730\u7684\u4ed3\u5e93\u5730\u5740\u7ed1\u5b9a\u5230Github\u4e0a\u3002 6.\u63d0\u4ea4\u4f60\u7684\u4ee3\u7801\u3002\u8f93\u5165\u201cgit push -u origin master\u201d\u547d\u4ee4\uff0c\u5c06\u4f60\u7684\u4ee3\u7801\u63a8\u9001\u5230GitHub\u4e0a\u3002\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u65b0\u5efa\u4e00\u4e2a\u8fdc\u7a0b\u7684\u201cmaster\u201d\u5206\u652f\uff0c\u5e76\u5c06\u4ee3\u7801\u63d0\u4ea4\u5230\u8fd9\u4e2a\u5206\u652f\u91cc\u3002 \u7b2c\u4e94\u6b65\uff1a\u68c0\u67e5\u662f\u5426\u6210\u529f \u6253\u5f00GitHub\u7f51\u7ad9\uff0c\u5237\u65b0\u521a\u521a\u65b0\u5efa\u7684\u4ed3\u5e93\u9875\u9762\uff0c\u5c31\u53ef\u4ee5\u770b\u5230\u521a\u521a\u63a8\u9001\u7684\u6587\u4ef6\u4e86\u3002 \u603b\u7ed3 \u4ee5\u4e0a\u5c31\u662f\u4e0a\u4f20\u4ee3\u7801\u5230GitHub\u4e0a\u7684\u8be6\u7ec6\u6b65\u9aa4\u3002\u5982\u679c\u4f60\u6709\u4e00\u4e9b\u4e0d\u9519\u7684\u9879\u76ee\u8d44\u6e90\uff0c\u6b63\u5f0f\u4e0a\u4f20\u5b83\u4eec\u5230GitHub\u4f9b\u5927\u5bb6\u4e0b\u8f7d\u4f7f\u7528\uff0c\u5c06\u4f1a\u7ed9\u4f60\u7684\u5f00\u6e90\u56e2\u961f\u5e26\u6765\u66f4\u591a\u7684\u826f\u597d\u53cd\u9988\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u5e2e\u52a9\u5230\u4f60\u3002 \u4ee5\u4e0a\u5c31\u662f\u4e0a\u4f20\u4ee3\u7801\u5230GitHub\u4e0a\u7684\u8be6\u7ec6\u6b65\u9aa4\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/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-18973","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18973","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=18973"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18973\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=18973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=18973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=18973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}