{"id":754,"date":"2026-06-23T00:08:50","date_gmt":"2026-06-23T00:08:50","guid":{"rendered":"https:\/\/hyc.eshachem.com\/program\/?page_id=754"},"modified":"2026-06-23T08:04:46","modified_gmt":"2026-06-23T08:04:46","slug":"2-%e6%90%9e%e6%87%82-push%e3%80%81pull%e3%80%81fetch-%e8%88%87-clone","status":"publish","type":"page","link":"https:\/\/hyc.eshachem.com\/program\/%e3%80%90git-github-%e6%95%99%e5%ad%b8%e3%80%91\/2-%e6%90%9e%e6%87%82-push%e3%80%81pull%e3%80%81fetch-%e8%88%87-clone\/","title":{"rendered":"2. \u641e\u61c2 Push\u3001Pull\u3001Fetch \u8207 Clone"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5c01\u9762\u90a3\u88cf\u6211\u6709\u63d0\u5230\uff0cGit\u6700\u6700\u5927\u7684\u7528\u8655\u5c31\u662f\u8b93\u6211\u5011\u5275\u5efa\u5206\u652f\uff0c\u4e00\u689d\u5206\u652f\u7576\u5be6\u9a57\u7528\uff0c\u53e6\u4e00\u689d\u5206\u652f\u7576\u6b63\u5f0f\u958b\u767c\u7528\u3002\u90a3\u5be6\u969b\u958b\u767c\u6642\uff0c\u6211\u5011\u5230\u5e95\u662f\u600e\u9ebc\u628a\u7a0b\u5f0f\u78bc\u5728\u300c\u672c\u5730\u96fb\u8166\u300d\u8207\u300c\u96f2\u7aef GitHub\u300d\u4e4b\u9593\u642c\u904b\u7684\u5462\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u76f4\u89ba\u7684\u7406\u89e3\u65b9\u5f0f\uff0c\u5c31\u662f\u628a\u9019\u6574\u500b\u904e\u7a0b\u770b\u4f5c\u662f\u4e00\u5957\u300c\u7269\u6d41\u5927\u5e2b\u7684\u62c9\u8ca8\u8207\u9001\u8ca8\u7cfb\u7d71\u300d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1-%e6%9c%ac%e5%9c%b0%ef%bc%88local%ef%bc%89%e8%88%87-%e9%81%a0%e7%ab%af%ef%bc%88remote%ef%bc%89\">1. \u672c\u5730\uff08Local\uff09\u8207 \u9060\u7aef\uff08Remote\uff09<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u958b\u59cb\u642c\u904b\u524d\uff0c\u6211\u5011\u8981\u5148\u5283\u5206\u5169\u500b\u4e16\u754c\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u672c\u5730\uff08Local\uff09\uff1a<\/strong> \u5c31\u662f\u4f60\u7684\u96fb\u8166\uff0c\u6b63\u5728\u7528 VS Code \u5beb\u6263\u7684\u5730\u65b9\u3002<\/li>\n\n\n\n<li><strong>\u9060\u7aef\uff08Remote\uff09\uff1a<\/strong> \u9060\u5728\u5929\u908a\u7684 GitHub \u4f3a\u670d\u5668\uff0c\u7528\u4f86\u4fdd\u5b58\u5718\u968a\u5171\u540c\u8cc7\u7522\u7684\u5730\u65b9\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u9019\u5169\u500b\u4e16\u754c\u5404\u6709\u5404\u7684 Git \u7d00\u9304\u3002\u800c\u63a5\u4e0b\u4f86\u7684\u56db\u500b\u52d5\u4f5c\uff0c\u5c31\u662f\u9023\u63a5\u9019\u5169\u500b\u4e16\u754c\u7684\u6a4b\u6881\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2-push%e3%80%81pull%e3%80%81fetch%e3%80%81clone\">2. Push\u3001Pull\u3001Fetch\u3001Clone<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"push\">Push<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u767d\u8a71\u6587\uff1a<\/strong> \u300c\u8001\u95c6\uff0c\u6211\u8ca8\u5305\u597d\u4e86\uff0c\u73fe\u5728\u767c\u8eca\u9001\u53bb\u7e3d\u5009\uff01\u300d<\/li>\n\n\n\n<li><strong>\u5e79\u561b\u7528\uff1a<\/strong> \u7576\u4f60\u5728\u672c\u5730\u5beb\u5b8c\u7a0b\u5f0f\u3001\u505a\u597d Commit\uff08\u7d00\u9304\u9ede\uff09\u5f8c\uff0c\u9019\u4e9b\u8b8a\u5316\u4f9d\u7136\u53ea\u5728\u4f60\u7684\u96fb\u8166\u88e1\u3002\u4f60\u9700\u8981\u900f\u904e <strong>Push<\/strong>\uff0c\u628a\u672c\u5730\u7684\u65b0 Commit \u300c\u63a8\u300d\u4e0a GitHub\u3002\u9019\u6a23\u4e00\u4f86\uff0c\u96f2\u7aef\u4e0a\u624d\u6703\u66f4\u65b0\u4f60\u7684\u6700\u65b0\u9032\u5ea6\uff0c\u5354\u540c\u958b\u767c\u7684\u5925\u4f34\u4e5f\u624d\u770b\u5f97\u5230\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"pull\">Pull<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u767d\u8a71\u6587\uff1a<\/strong> \u300c\u807d\u8aaa\u7e3d\u5009\u6709\u65b0\u8ca8\uff1f\u7acb\u523b\u8f09\u56de\u4f86\u4e26\u76f4\u63a5\u4e0a\u67b6\u5230\u6211\u7684\u5e97\u9762\uff01\u300d<\/li>\n\n\n\n<li><strong>\u5e79\u561b\u7528\uff1a<\/strong> \u7576\u5718\u968a\u88e1\u7684\u5176\u4ed6\u5de5\u7a0b\u5e2b Push \u4e86\u4ed6\u5011\u5beb\u597d\u7684\u65b0\u529f\u80fd\u5230 GitHub\uff0c\u6b64\u6642\u4f60\u672c\u5730\u7684\u7a0b\u5f0f\u78bc\u5c31\u843d\u5f8c\u4e86\u3002\u4f60\u9700\u8981\u900f\u904e <strong>Pull<\/strong>\uff0c\u628a GitHub \u4e0a\u5225\u4eba\u5beb\u597d\u7684\u65b0\u9032\u5ea6\u300c\u62c9\u300d\u56de\u4f60\u7684\u96fb\u8166\uff0c\u800c\u4e14 Git \u6703\u975e\u5e38\u8070\u660e\u5730\u81ea\u52d5\u5e6b\u4f60\u5408\u4f75\uff08Merge\uff09\u5230\u4f60\u76ee\u524d\u7684\u6a94\u6848\u88e1\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"fetch\">Fetch<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u767d\u8a71\u6587\uff1a<\/strong> \u300c\u807d\u8aaa\u7e3d\u5009\u6709\u65b0\u9032\u5ea6\uff1f\u6211\u5148\u62ff\u500b\u51fa\u8ca8\u55ae\u770b\u770b\u6539\u4e86\u4ec0\u9ebc\uff0c\u4f46\u6211\u5e97\u9762\u7684\u8ca8\u5148\u7dad\u6301\u539f\u72c0\u3002\u300d<\/li>\n\n\n\n<li><strong>\u5e79\u561b\u7528\uff1a<\/strong> <strong>Fetch \u8207 Pull \u975e\u5e38\u50cf\uff0c\u4f46\u5c11\u4e86\u4e00\u500b\u300c\u81ea\u52d5\u5408\u4f75\u300d\u7684\u6b65\u9a5f\u3002<\/strong> \u57f7\u884c Fetch \u6642\uff0cGit \u53ea\u6703\u628a\u96f2\u7aef\u7684\u6700\u65b0\u72c0\u614b\u540c\u6b65\u5230\u4f60\u672c\u5730\u7684\u300c\u9060\u7aef\u8ffd\u8e64\u5206\u652f\u300d\u7d00\u9304\u88e1\uff0c\u4f46<strong>\u5b8c\u5168\u4e0d\u6703\u52d5\u5230\u4f60\u76ee\u524d\u6b63\u5728\u5beb\u7684\u4efb\u4f55\u6a94\u6848<\/strong>\u3002\u9069\u5408\u7528\u5728\u4f60\u300c\u60f3\u5148\u78ba\u8a8d\u5225\u4eba\u6539\u4e86\u4ec0\u9ebc\uff0c\u78ba\u8a8d\u6c92\u554f\u984c\u5f8c\u518d\u81ea\u5df1\u624b\u52d5\u5408\u4f75\u300d\u7684\u5834\u666f\u3002<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udca1 <strong>\u5927\u516c\u5f0f\uff1a<\/strong> <code>Pull = Fetch + Merge\uff08\u5408\u4f75\uff09<\/code><\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"clone\">Clone<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u767d\u8a71\u6587\uff1a<\/strong> \u300c\u9019\u5bb6\u5e97\u7684\u52a0\u76df\u7e3d\u90e8\u84cb\u5f97\u592a\u597d\u4e86\uff0c\u6211\u8981\u8907\u88fd\u4e00\u6a21\u4e00\u6a23\u7684\u6574\u5ea7\u5009\u5eab\u5230\u6211\u5bb6\u9694\u58c1\uff01\u300d<\/li>\n\n\n\n<li><strong>\u5e79\u561b\u7528\uff1a<\/strong> \u901a\u5e38\u662f\u7528\u5728\u4f60<strong>\u525b\u52a0\u5165\u4e00\u500b\u65b0\u5c08\u6848<\/strong>\uff0c\u6216\u8005\u5728 GitHub \u4e0a\u770b\u5230\u5225\u4eba\u7684\u958b\u6e90\u5c08\u6848\u5f88\u8b9a\u6642\u3002\u4f60\u672c\u5730\u76ee\u524d\u300c\u4ec0\u9ebc\u90fd\u6c92\u6709\u300d\uff0c\u9019\u6642\u53ea\u8981\u8f38\u5165 <code>git clone [\u7db2\u5740]<\/code>\uff0cGit \u5c31\u6703\u628a\u9060\u7aef\u5132\u5b58\u5eab\u7684\u7a0b\u5f0f\u78bc\u3001\u6b77\u53f2\u7d00\u9304\u3001\u6240\u6709\u5206\u652f\uff0c<strong>\u539f\u5c01\u4e0d\u52d5\u3001\u5fb9\u5fb9\u5e95\u5e95\u5730\u5b8c\u6574\u4e0b\u8f09\u4e00\u4efd<\/strong>\u5230\u4f60\u7684\u96fb\u8166\u88e1\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3-%e7%b8%bd%e8%a1%a8\">3. \u7e3d\u8868<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>\u52d5\u4f5c<\/strong><\/td><td><strong>\u65b9\u5411<\/strong><\/td><td><strong>\u4ec0\u9ebc\u6642\u5019\u6703\u7528\u5230\uff1f<\/strong><\/td><td><strong>\u5c0d\u672c\u5730\u6a94\u6848\u7684\u5f71\u97ff<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Clone<\/strong><\/td><td>\u96f2\u7aef\u2b95\u672c\u5730<\/td><td><strong>\u7b2c\u4e00\u6b21<\/strong>\u8981\u4e0b\u8f09\u6574\u500b\u5c08\u6848\u6642\u3002<\/td><td>\u5efa\u7acb\u5168\u65b0\u8cc7\u6599\u593e\u8207\u6240\u6709\u6b77\u53f2\u3002<\/td><\/tr><tr><td><strong>Push<\/strong><\/td><td>\u672c\u5730\u2b95\u96f2\u7aef<\/td><td>\u5beb\u5b8c\u4e00\u500b\u968e\u6bb5\uff0c\u60f3\u5099\u4efd\u6216\u5206\u4eab\u9032\u5ea6\u6642\u3002<\/td><td>\u7121\uff0c\u53ea\u6703\u66f4\u65b0\u96f2\u7aef\u3002<\/td><\/tr><tr><td><strong>Pull<\/strong><\/td><td>\u96f2\u7aef \u2b95\u672c\u5730<\/td><td>\u958b\u59cb\u5beb\u7a0b\u5f0f\u524d\uff0c\u78ba\u4fdd\u81ea\u5df1\u62ff\u5230\u5718\u968a\u6700\u65b0\u9032\u5ea6\u3002<\/td><td><strong>\u6703<\/strong>\uff0c\u76f4\u63a5\u6539\u5beb\u4f60\u76ee\u524d\u7684\u6a94\u6848\u3002<\/td><\/tr><tr><td><strong>Fetch<\/strong><\/td><td>\u96f2\u7aef \u2b95\u672c\u5730<\/td><td>\u60f3\u77e5\u9053\u96f2\u7aef\u6709\u6c92\u6709\u66f4\u65b0\uff0c\u4f46\u73fe\u5728\u4e0d\u60f3\u52d5\u5230\u672c\u5730\u6a94\u6848\u3002<\/td><td><strong>\u4e0d\u6703<\/strong>\u52d5\u5230\u4f60\u6b63\u5728\u5beb\u7684\u6a94\u6848\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4-%e5%af%a6%e6%88%b0push\">4. \u5be6\u6230push !<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e00\u7ae0\u7684\u6642\u5019\u6211\u5011\u6709\u5efa\u7acb\u4e86\u4e00\u500b\u5c08\u6848\uff0c\u88e1\u9762\u5305\u542bindex.html\uff0c\u4e26\u5c07\u5176\u63a8\u9001\u4e0aGitHub\uff0c\u9019\u4e9b\u52d5\u4f5c\u7a31\u70ba<strong>Initialization<\/strong> \u521d\u59cb\u5316\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u90a3\u73fe\u5728\u6b63\u5f0f\u9032\u5165\u958b\u767c\u968e\u6bb5\u5f8c\uff0c\u53c8\u8a72\u5982\u4f55\u64cd\u4f5c\u5462?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. \u4fee\u6539\u6a94\u6848\uff08\u4f8b\u5982\u65b0\u589e\u4e00\u884c\u5b57\uff09\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u5011\u900f\u904e\u6307\u4ee4\u4f86\u4fee\u6539index.html\u9019\u500b\u6a94\u6848(\u7576\u7136\u4f60\u4e5f\u53ef\u4ee5\u5f9eVScode\u4e2d\u958b\u555f\u4e26\u4fee\u6539)\u3002<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">echo \"<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>Update: Adding some new features...<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\" &gt;&gt; index.html\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><strong>2. \u91cd\u8907\u4ee5\u4e0b\u4e09\u6b65\u9a5f\uff1a<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">git add .\ngit commit -m <span class=\"hljs-string\">\"Update index.html with new paragraph\"<\/span>\ngit push\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>git add .<\/code><\/strong> \u8868\u793a\u628a\u7576\u524d\u8cc7\u6599\u593e\u7684\u6240\u6709\u6a94\u6848\u4e00\u6b21\u88dd\u7bb1<\/li>\n\n\n\n<li><strong><code>git commit -m<\/code><\/strong> <code>-m<\/code> \u5f8c\u9762\u7684\u96d9\u5f15\u865f\u88e1\uff0c\u8acb\u52d9\u5fc5\u5beb\u4e0b\u300c\u9019\u6b21\u505a\u4e86\u4ec0\u9ebc\u66f4\u6539\u300d\u7684\u767d\u8a71\u6587(\u901a\u5e38\u6703\u662f: \u52d5\u8a5e + \u540d\u8a5e e.g. \u65b0\u589e \u9996\u9801)\uff0c\u7d66\u9019\u6b21\u88dd\u7bb1\u7684\u8ca8\u7269\u8cbc\u500b\u6a19\u7c64\u3002<\/li>\n\n\n\n<li><code><strong>git push<\/strong> <\/code>\u628a\u8ca8\u9001\u4e0a GitHub !<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u5f8c\u65e5\u5e38\u958b\u767c\uff0c\u4f60\u53ea\u9700\u8981\u760b\u72c2\u91cd\u8907\u9019\u4e09\u884c\u6307\u4ee4\uff0c\u4f60\u7684\u96f2\u7aef\u9032\u5ea6\u5c31\u6703\u6c38\u9060\u7dad\u6301\u6700\u65b0\u72c0\u614b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"5-%e5%af%a6%e6%88%b0-clone\">5. \u5be6\u6230 Clone!<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u5011\u6210\u529f\u628a\u5c08\u6848\u63a8\u4e0a GitHub \u5f8c\u3002\u73fe\u5728\uff0c\u8acb\u5728\u4f60\u7684\u96fb\u8166\u4e0a\u958b\u4e00\u500b<strong>\u5168\u65b0\u3001\u7a7a\u7a7a\u5982\u4e5f\u7684\u8cc7\u6599\u593e<\/strong>\uff0c\u6211\u5011\u4f86\u6a21\u64ec\u300c\u5728\u53e6\u4e00\u53f0\u96fb\u8166\u4e0a\u4e0b\u8f09\u5c08\u6848\u300d\u7684\u60c5\u5883\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7576\u4f60\u5230\u4e00\u5bb6\u65b0\u516c\u53f8\u4e0a\u5de5\uff0c\u6216\u662f\u60f3\u628a GitHub \u4e0a\u5225\u4eba\u7684\u958b\u6e90\u5c08\u6848\u6574\u5305\u6293\u4e0b\u4f86\u6642\uff0c\u9019\u662f\u4f60\u300c\u7b2c\u4e00\u500b\u6703\u8f38\u5165\u7684\u6307\u4ee4\u300d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9032\u5165\u5168\u65b0\u7684\u7a7a\u8cc7\u6599\u593e\u5f8c\uff0c\u8acb\u53bb\u4f60\u7684 GitHub \u8907\u88fd\u4e0a\u4e00\u7ae0\u5efa\u7acb\u7684\u5c08\u6848\u7db2\u5740\uff08<code>https:\/\/github.com\/\u4f60\u7684\u5e33\u865f\/my-project.git<\/code>\uff09\uff0c\u7136\u5f8c\u518d\u7d42\u7aef\u6a5f\u8f38\u5165\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">git <span class=\"hljs-keyword\">clone<\/span> https:<span class=\"hljs-comment\">\/\/github.com\/\u4f60\u7684\u5e33\u865f\/my-project.git<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">\u63a5\u8457\u9032\u5165\u8cc7\u6599\u593e\u4e26\u8f38\u51fa\u6a94\u6848\u770b\u770b~<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">cd my-project\nls -la\n<\/code><\/span><\/pre>\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u4f60\u6703\u770b\u5230\u8cc7\u6599\u593e\u88e1\u4e0d\u53ea\u6709 <code>index.html<\/code>\uff0c\u9023\u96b1\u85cf\u7684 <code>.git<\/code> \u8cc7\u6599\u593e\u90fd\u5e6b\u4f60\u6e96\u5099\u597d\u4e86\uff01\u9019\u4ee3\u8868 <code>clone<\/code> \u4e0d\u53ea\u5e6b\u4f60\u4e0b\u8f09\u6a94\u6848\uff0c\u9023<strong>\u9060\u7aef\u5730\u5740\uff08origin\uff09\u548c\u6240\u6709\u7684\u6b77\u53f2\u7d00\u9304<\/strong>\u90fd\u4e00\u4f75\u8907\u88fd\u904e\u4f86\u4e86\uff0c\u4f60\u4e0d\u9700\u8981\u518d\u91cd\u65b0\u8f38\u5165 <code>git init<\/code>\u3002<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"6-%e5%af%a6%e6%88%b0-fetch\">6. \u5be6\u6230 fetch !<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u70ba\u4e86\u6a21\u64ec\u300c\u5225\u4eba\u5728\u4ed6\u90a3\u88e1\u6539\u4e86\u7a0b\u5f0f\u78bc\u300d\u7684\u60c5\u5883\uff0c\u6211\u5011\u73fe\u5728\u505a\u500b\u5c0f\u5be6\u9a57\uff1a<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>\u8acb\u6253\u958b\u4f60\u7684 <strong>GitHub \u7db2\u9801<\/strong>\uff0c\u9ede\u9032\u53bb <code>index.html<\/code>\u3002<\/li>\n\n\n\n<li>\u9ede\u64ca\u53f3\u4e0a\u89d2\u7684\u5c0f\u925b\u7b46\u7de8\u8f2f\u5b83\uff0c\u5728\u88e1\u9762\u96a8\u4fbf\u52a0\u4e0a\u4e00\u884c\u5b57\uff1a<code>&lt;h2&gt;This line is edited from GitHub website!&lt;\/h2&gt;<\/code>\u3002<\/li>\n\n\n\n<li>\u9ede\u64ca <strong>Commit changes\u2026<\/strong> \u5132\u5b58\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b64\u6642\uff0c<strong>\u96f2\u7aef\u7684\u9032\u5ea6\u5df2\u7d93\u9818\u5148\u4f60\u672c\u5730\u7684\u96fb\u8166\u4e86<\/strong>\u3002\u63a5\u4e0b\u4f86\u6211\u5011\u7528 <code>fetch<\/code> \u4f86\u6253\u63a2\u6575\u60c5\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">git fetch\n<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">\u9019\u6642\u7d42\u7aef\u6a5f\u6703\u8df3\u51fa\u4e00\u4e9b\u9032\u5ea6\u689d\uff0c\u4ee3\u8868\u5b83\u5df2\u7d93\u53bb\u96f2\u7aef\u300c\u6293\u53d6\u6700\u65b0\u7684\u7d00\u9304\u300d\u4e0b\u4f86\u4e86\uff0c\u63a5\u8457\u7528 VS Code \u6253\u958b\u672c\u5730\u7684 <code>index.html<\/code>\uff0c\u6703\u767c\u73fe<strong>\u525b\u525b\u5728\u7db2\u9801\u4e0a\u6539\u7684\u90a3\u884c\u5b57\u300c\u9084\u6c92\u6709\u51fa\u73fe\u300d<\/strong>\uff01<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>fetch \u7684\u672c\u8cea\uff1a<\/strong> \u5b83\u53ea\u6703\u66f4\u65b0\u4f60\u672c\u5730\u96fb\u8166\u88e1\u7684\u300c\u9060\u7aef\u5206\u652f\u7d00\u9304\u300d\uff08\u4f8b\u5982 upstream<code>\/main<\/code>\uff09\uff0c\u8b93\u4f60\u77e5\u9053\u96f2\u7aef\u6709\u65b0\u6771\u897f\uff0c\u4f46<strong>\u4e0d\u6703\u64c5\u81ea\u4fee\u6539\u4f60\u76ee\u524d\u7684\u5be6\u9ad4\u6a94\u6848<\/strong>\u3002<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"7-%e5%af%a6%e6%88%b0-pull\">7. \u5be6\u6230 pull !<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4f60\u770b\u5b8c fetch \u7684\u9805\u76ee\uff0c\u78ba\u8a8d\u96f2\u7aef\u7684\u4fee\u6539\u6c92\u554f\u984c\uff0c\u60f3\u8981\u628a\u6b63\u5f0f\u7248\u672c\u7684\u65b0\u7a0b\u5f0f\u78bc\u300c\u5408\u9032\u4f86\u300d\u4f60\u76ee\u524d\u7684\u6a94\u6848\uff0c\u9019\u6642\u5c31\u8981\u7528 <code>pull<\/code>\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">git pull\n<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">\u7d42\u7aef\u6a5f\u6703\u986f\u793a <code>Fast-forward<\/code> \u4ee5\u53ca\u6709\u54ea\u4e9b\u6a94\u6848\u88ab\u4fee\u6539\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9019\u6642\u5019\u56de\u982d\u53bb\u770b\u4f60\u7684\u672c\u5730 <code>index.html<\/code>\uff0c\u4f60\u6703\u767c\u73fe\u7db2\u9801\u4e0a\u6539\u7684\u90a3\u884c <code>&lt;h2&gt;<\/code> \u5df2\u7d93\u5b8c\u7f8e\u51fa\u73fe\u5728\u4f60\u7684\u7a0b\u5f0f\u78bc\u88e1\u4e86\uff01<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u5176\u5be6\u65e5\u5e38\u958b\u767c\u4e2d\uff0c\u5982\u679c\u4f60\u767e\u5206\u4e4b\u767e\u78ba\u5b9a\u96f2\u7aef\u7684\u7a0b\u5f0f\u78bc\u5f88\u4e7e\u6de8\uff0c\u53ef\u4ee5\u76f4\u63a5\u8f38\u5165 <code>git pull<\/code>\uff0c\u5b83\u6703\u81ea\u52d5\u5e6b\u4f60\u505a\u5b8c <code>fetch + merge\uff08\u5408\u4f75\uff09<\/code>\u3002<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"daily-flow\">Daily Flow<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b78\u6703\u4e86\u9019\u5957\u7d44\u5408\u62f3\u5f8c\uff0c\u4ee5\u4e0b\u662f\u672a\u4f86\u7684\u5de5\u7a0b\u5e2b\u65e5\u5e38\u57fa\u672c\u7d20\u990a\uff1a<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>\u6bcf\u5929\u65e9\u4e0a\u958b\u5de5\u7b2c\u4e00\u4ef6\u4e8b\uff1a<\/strong> \u5148\u8f38\u5165 <code>git pull<\/code>\uff0c\u628a\u5718\u968a\u6628\u5929\u6df1\u591c\u63a8\u4e0a\u96f2\u7aef\u7684\u6700\u65b0\u9032\u5ea6\u62c9\u4e0b\u4f86\uff0c\u907f\u514d\u81ea\u5df1\u5beb\u5728\u820a\u7684\u57fa\u5e95\u4e0a\u3002<\/li>\n\n\n\n<li><strong>\u5beb\u5b8c\u4e00\u500b\u529f\u80fd\u5f8c\uff1a<\/strong> \u5148 <code>git add .<\/code> \u2b95 <code>git commit<\/code>\u2b95 \u6700\u5f8c <code>git push<\/code> \u9001\u4e0a\u96f2\u7aef\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u719f\u6089\u5f8c\u5c31\u4e0d\u662f\u4ec0\u9ebc\u96e3\u984c\u5566!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c01\u9762\u90a3\u88cf\u6211\u6709\u63d0\u5230\uff0cGit\u6700\u6700\u5927\u7684\u7528\u8655\u5c31\u662f\u8b93\u6211\u5011\u5275\u5efa\u5206\u652f\uff0c\u4e00\u689d\u5206\u652f\u7576\u5be6\u9a57\u7528\uff0c\u53e6\u4e00\u689d\u5206\u652f\u7576\u6b63\u5f0f\u958b\u767c\u7528\u3002\u90a3\u5be6\u969b\u958b\u767c\u6642\uff0c\u6211\u5011\u5230\u5e95\u662f\u600e\u9ebc\u628a\u7a0b\u5f0f\u78bc\u5728\u300c\u672c\u5730\u96fb\u8166\u300d\u8207\u300c\u96f2\u7aef GitHub\u300d\u4e4b\u9593\u642c\u904b\u7684\u5462\uff1f \u6700\u76f4\u89ba\u7684\u7406\u89e3\u65b9\u5f0f\uff0c\u5c31\u662f\u628a\u9019\u6574\u500b\u904e\u7a0b\u770b\u4f5c\u662f\u4e00\u5957\u300c\u7269\u6d41\u5927\u5e2b\u7684\u62c9\u8ca8\u8207\u9001\u8ca8\u7cfb\u7d71\u300d\u3002 1. \u672c\u5730\uff08Local\uff09\u8207 \u9060\u7aef\uff08Remote\uff09 \u5728\u958b\u59cb\u642c\u904b\u524d\uff0c\u6211\u5011\u8981\u5148\u5283\u5206\u5169\u500b\u4e16\u754c\uff1a \u9019\u5169\u500b\u4e16\u754c\u5404\u6709\u5404\u7684 Git \u7d00\u9304\u3002\u800c\u63a5\u4e0b\u4f86\u7684\u56db\u500b\u52d5\u4f5c\uff0c\u5c31\u662f\u9023\u63a5\u9019\u5169\u500b\u4e16\u754c\u7684\u6a4b\u6881\u3002 2. Push\u3001Pull\u3001Fetch\u3001Clone Push Pull Fetch \ud83d\udca1 \u5927\u516c\u5f0f\uff1a Pull = Fetch + Merge\uff08\u5408\u4f75\uff09 Clone 3. \u7e3d\u8868 \u52d5\u4f5c \u65b9\u5411 \u4ec0\u9ebc\u6642\u5019\u6703\u7528\u5230\uff1f \u5c0d\u672c\u5730\u6a94\u6848\u7684\u5f71\u97ff Clone \u96f2\u7aef\u2b95\u672c\u5730 \u7b2c\u4e00\u6b21\u8981\u4e0b\u8f09\u6574\u500b\u5c08\u6848\u6642\u3002 \u5efa\u7acb\u5168\u65b0\u8cc7\u6599\u593e\u8207\u6240\u6709\u6b77\u53f2\u3002 Push \u672c\u5730\u2b95\u96f2\u7aef \u5beb\u5b8c\u4e00\u500b\u968e\u6bb5\uff0c\u60f3\u5099\u4efd\u6216\u5206\u4eab\u9032\u5ea6\u6642\u3002 \u7121\uff0c\u53ea\u6703\u66f4\u65b0\u96f2\u7aef\u3002 Pull \u96f2\u7aef \u2b95\u672c\u5730 \u958b\u59cb\u5beb\u7a0b\u5f0f\u524d\uff0c\u78ba\u4fdd\u81ea\u5df1\u62ff\u5230\u5718\u968a\u6700\u65b0\u9032\u5ea6\u3002 \u6703\uff0c\u76f4\u63a5\u6539\u5beb\u4f60\u76ee\u524d\u7684\u6a94\u6848\u3002 Fetch \u96f2\u7aef \u2b95\u672c\u5730 \u60f3\u77e5\u9053\u96f2\u7aef\u6709\u6c92\u6709\u66f4\u65b0\uff0c\u4f46\u73fe\u5728\u4e0d\u60f3\u52d5\u5230\u672c\u5730\u6a94\u6848\u3002 \u4e0d\u6703\u52d5\u5230\u4f60\u6b63\u5728\u5beb\u7684\u6a94\u6848\u3002 4. \u5be6\u6230push ! \u7b2c\u4e00\u7ae0\u7684\u6642\u5019\u6211\u5011\u6709\u5efa\u7acb\u4e86\u4e00\u500b\u5c08\u6848\uff0c\u88e1\u9762\u5305\u542bindex.html\uff0c\u4e26\u5c07\u5176\u63a8\u9001\u4e0aGitHub\uff0c\u9019\u4e9b\u52d5\u4f5c\u7a31\u70baInitialization \u521d\u59cb\u5316\u3002 \u90a3\u73fe\u5728\u6b63\u5f0f\u9032\u5165\u958b\u767c\u968e\u6bb5\u5f8c\uff0c\u53c8\u8a72\u5982\u4f55\u64cd\u4f5c\u5462? 1. \u4fee\u6539\u6a94\u6848\uff08\u4f8b\u5982\u65b0\u589e\u4e00\u884c\u5b57\uff09\uff1a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":744,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-754","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/pages\/754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/comments?post=754"}],"version-history":[{"count":3,"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/pages\/754\/revisions"}],"predecessor-version":[{"id":762,"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/pages\/754\/revisions\/762"}],"up":[{"embeddable":true,"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/pages\/744"}],"wp:attachment":[{"href":"https:\/\/hyc.eshachem.com\/program\/wp-json\/wp\/v2\/media?parent=754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}