{"id":80681,"date":"2026-03-05T18:49:09","date_gmt":"2026-03-05T10:49:09","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/80681.html"},"modified":"2026-03-05T18:49:09","modified_gmt":"2026-03-05T10:49:09","slug":"github%e5%8d%8f%e4%bd%9c%e5%8a%9f%e8%83%bdpull-request%ef%bc%88pr%ef%bc%89%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/80681.html","title":{"rendered":"github\u534f\u4f5c\u529f\u80fdPull Request\uff08PR\uff09\u6307\u5357"},"content":{"rendered":"<h3>Pull Request \u7b80\u4ecb<\/h3>\n<p>\u62c9\u53d6\u8bf7\u6c42&#xff08;Pull Request&#xff09;\u662f\u5c06\u4ee3\u7801\u4fee\u6539\u5408\u5e76\u5230\u9879\u76ee\u4e2d\u7684\u63d0\u8bae\u3002\u5b83\u662f GitHub \u7684\u6838\u5fc3\u534f\u4f5c\u529f\u80fd&#xff0c;\u652f\u6301\u5728\u5408\u5e76\u524d\u5bf9\u4fee\u6539\u8fdb\u884c\u8ba8\u8bba\u4e0e\u5ba1\u6838&#xff0c;\u6709\u52a9\u4e8e\u56e2\u961f\u534f\u4f5c\u3001\u5c3d\u65e9\u53d1\u73b0\u95ee\u9898\u5e76\u4fdd\u8bc1\u4ee3\u7801\u8d28\u91cf\u3002\u5728\u5f00\u6e90\u9879\u76ee\u4e2d&#xff0c;Pull Request \u88ab\u5e7f\u6cdb\u7528\u4e8e\u53c2\u4e0e\u793e\u533a\u8d21\u732e\u3002<\/p>\n<p>\u5bf9\u4e8e GitHub \u4e0a\u5176\u4ed6\u4eba\u5efa\u7acb\u7684\u9879\u76ee&#xff0c;\u6211\u4eec\u60f3\u8981\u5bf9\u5176\u8fdb\u884c\u5b8c\u5584\u548c\u4fee\u6539&#xff0c;\u5e76\u5411\u9879\u76ee\u7684\u7ef4\u62a4\u8005\u63d0\u51fa\u5408\u5e76\u8bf7\u6c42\u65f6&#xff0c;\u5c31\u9700\u8981\u4f7f\u7528 Pull Request \u529f\u80fd\u3002\u6574\u4e2a\u6d41\u7a0b\u662f\u8fd9\u6837\u7684&#xff1a;Fork \u4ed3\u5e93 \u2192 \u5efa\u5206\u652f \u2192 \u6539\u4ee3\u7801 \u2192 \u63a8\u5230 Fork \u4ed3\u5e93 \u2192 \u5411\u539f\u9879\u76ee\u63d0 PR \u2192 \u539f\u9879\u76ee\u7ef4\u62a4\u8005\u5ba1\u6838\u540e\u5408\u5e76\u3002<\/p>\n<p>\u4e0b\u9762\u6211\u4eec\u7ed9\u51fa\u4f7f\u7528Pull Request\u534f\u4f5c\u5f00\u53d1\u65f6\u7684\u7528\u5230\u6bcf\u4e00\u6b65\u547d\u4ee4&#xff0c;\u5e76\u89e3\u91ca\u6bcf\u4e2a\u547d\u4ee4\u7684\u4f5c\u7528<\/p>\n<h3>Pull Request \u534f\u4f5c\u6d41\u7a0b<\/h3>\n<h4>1. \u514b\u9686\u4f60\u7684 Fork \u5230\u672c\u5730<\/h4>\n<p><span class=\"token function\">git<\/span> clone git&#064;github.com:\u4f60\u7684\u7528\u6237\u540d\/\u9879\u76ee\u540d.git<br \/>\n<span class=\"token builtin class-name\">cd<\/span> \u9879\u76ee\u540d<\/p>\n<ul>\n<li>git clone &lt;\u4ed3\u5e93\u5730\u5740&gt;&#xff1a;\u5c06\u8fdc\u7a0b\u4ed3\u5e93\u5b8c\u6574\u5730\u590d\u5236\u5230\u672c\u5730\u3002\u8fd9\u91cc\u7528\u7684\u662f SSH \u5730\u5740&#xff08;\u4ee5 git&#064;github.com: \u5f00\u5934&#xff09;&#xff0c;\u5982\u679c\u4f60\u914d\u7f6e\u4e86 SSH \u5bc6\u94a5&#xff0c;\u5c31\u53ef\u4ee5\u514d\u5bc6\u64cd\u4f5c\u3002\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528 HTTPS \u5730\u5740&#xff0c;\u4f46\u6bcf\u6b21\u63a8\u9001\u53ef\u80fd\u9700\u8981\u8f93\u5165\u8d26\u53f7\u5bc6\u7801\u3002<\/li>\n<li>cd \u9879\u76ee\u540d&#xff1a;\u8fdb\u5165\u9879\u76ee\u76ee\u5f55&#xff0c;\u540e\u7eed\u64cd\u4f5c\u90fd\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u8fdb\u884c\u3002<\/li>\n<\/ul>\n<p>\u514b\u9686\u5b8c\u6210\u540e&#xff0c;\u672c\u5730\u4ed3\u5e93\u4f1a\u81ea\u52a8\u5173\u8054\u4e00\u4e2a\u540d\u4e3a origin \u7684\u8fdc\u7a0b\u4ed3\u5e93&#xff0c;\u6307\u5411\u4f60\u7684 Fork\u3002<\/p>\n<h4>2. \u6dfb\u52a0\u4e0a\u6e38&#xff08;\u539f\u9879\u76ee&#xff09;\u8fdc\u7a0b&#xff08;\u540c\u6b65\u7528&#xff09;<\/h4>\n<p><span class=\"token function\">git<\/span> remote <span class=\"token function\">add<\/span> upstream git&#064;github.com:\u539f\u4f5c\u8005\/\u9879\u76ee\u540d.git<br \/>\n<span class=\"token comment\"># \u9a8c\u8bc1<\/span><br \/>\n<span class=\"token function\">git<\/span> remote <span class=\"token parameter variable\">-v<\/span><\/p>\n<ul>\n<li>git remote add upstream &lt;\u5730\u5740&gt;&#xff1a;\u7ed9\u5f53\u524d\u672c\u5730\u4ed3\u5e93\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u8fdc\u7a0b\u4ed3\u5e93&#xff0c;\u4e60\u60ef\u4e0a\u547d\u540d\u4e3a upstream&#xff08;\u4e0a\u6e38&#xff09;&#xff0c;\u6307\u5411\u539f\u4f5c\u8005\u7684\u4ed3\u5e93\u3002\u8fd9\u6837\u4f60\u5c31\u53ef\u4ee5\u968f\u65f6\u4ece\u539f\u9879\u76ee\u62c9\u53d6\u6700\u65b0\u7684\u66f4\u65b0&#xff0c;\u4fdd\u6301\u672c\u5730\u4ee3\u7801\u4e0e\u4e0a\u6e38\u540c\u6b65\u3002<\/li>\n<li>git remote -v&#xff1a;\u5217\u51fa\u6240\u6709\u5df2\u914d\u7f6e\u7684\u8fdc\u7a0b\u4ed3\u5e93\u53ca\u5176\u5730\u5740&#xff0c;\u7528\u6765\u9a8c\u8bc1 upstream \u662f\u5426\u6dfb\u52a0\u6210\u529f\u3002\u4f60\u4f1a\u770b\u5230\u7c7b\u4f3c\u8fd9\u6837\u7684\u8f93\u51fa&#xff1a;origin    git&#064;github.com:\u4f60\u7684\u7528\u6237\u540d\/\u9879\u76ee\u540d.git (fetch)<br \/>\norigin    git&#064;github.com:\u4f60\u7684\u7528\u6237\u540d\/\u9879\u76ee\u540d.git (push)<br \/>\nupstream  git&#064;github.com:\u539f\u4f5c\u8005\/\u9879\u76ee\u540d.git (fetch)<br \/>\nupstream  git&#064;github.com:\u539f\u4f5c\u8005\/\u9879\u76ee\u540d.git (push)\n <\/li>\n<\/ul>\n<p>\u4e3a\u4ec0\u4e48\u9700\u8981 upstream&#xff1f; \u56e0\u4e3a\u4f60\u7684 Fork \u662f\u4ece\u539f\u9879\u76ee\u590d\u5236\u8fc7\u6765\u7684&#xff0c;\u4f46\u539f\u9879\u76ee\u540e\u7eed\u53ef\u80fd\u4f1a\u6709\u65b0\u7684\u63d0\u4ea4&#xff0c;\u5982\u679c\u4e0d\u53ca\u65f6\u540c\u6b65&#xff0c;\u4f60\u7684\u4ee3\u7801\u5c31\u4f1a\u843d\u540e&#xff0c;\u63d0 PR \u65f6\u5bb9\u6613\u4ea7\u751f\u51b2\u7a81\u3002<\/p>\n<h4>3. \u57fa\u4e8e\u6700\u65b0\u4ee3\u7801\u5efa\u65b0\u5206\u652f&#xff08;\u522b\u5728 main \u76f4\u63a5\u6539&#xff09;<\/h4>\n<p><span class=\"token comment\"># \u62c9\u53d6\u4e0a\u6e38\u6700\u65b0\u4ee3\u7801<\/span><br \/>\n<span class=\"token function\">git<\/span> fetch upstream<br \/>\n<span class=\"token function\">git<\/span> checkout main<br \/>\n<span class=\"token function\">git<\/span> merge upstream\/main<br \/>\n<span class=\"token comment\"># \u521b\u5efa\u529f\u80fd\u5206\u652f<\/span><br \/>\n<span class=\"token function\">git<\/span> checkout <span class=\"token parameter variable\">-b<\/span> feature\/\u4f60\u7684\u529f\u80fd\u540d<\/p>\n<ul>\n<li>git fetch upstream&#xff1a;\u4ece upstream \u8fdc\u7a0b\u4ed3\u5e93\u83b7\u53d6\u6700\u65b0\u7684\u63d0\u4ea4\u548c\u5386\u53f2&#xff0c;\u4f46\u4e0d\u4f1a\u81ea\u52a8\u5408\u5e76\u5230\u4f60\u7684\u5f53\u524d\u5206\u652f\u3002\u8fd9\u8ba9\u4f60\u53ef\u4ee5\u5148\u770b\u770b\u6709\u54ea\u4e9b\u66f4\u65b0&#xff0c;\u518d\u51b3\u5b9a\u5982\u4f55\u5408\u5e76\u3002<\/li>\n<li>git checkout main&#xff1a;\u5207\u6362\u5230\u672c\u5730 main \u5206\u652f&#xff08;\u4e5f\u53ef\u80fd\u662f master&#xff0c;\u89c6\u9879\u76ee\u800c\u5b9a&#xff09;\u3002<\/li>\n<li>git merge upstream\/main&#xff1a;\u5c06 upstream\/main \u5206\u652f\u4e0a\u7684\u6700\u65b0\u63d0\u4ea4\u5408\u5e76\u5230\u5f53\u524d\u6240\u5728\u7684\u672c\u5730 main \u5206\u652f\u3002\u8fd9\u4e00\u6b65\u8ba9\u672c\u5730 main \u4e0e\u4e0a\u6e38\u4fdd\u6301\u540c\u6b65\u3002<\/li>\n<li>git checkout -b feature\/\u4f60\u7684\u529f\u80fd\u540d&#xff1a;\u57fa\u4e8e\u5f53\u524d\u5206\u652f&#xff08;\u5df2\u7ecf\u662f\u6700\u65b0\u7684 main&#xff09;\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5206\u652f&#xff0c;\u5e76\u7acb\u5373\u5207\u6362\u8fc7\u53bb\u3002-b \u7684\u610f\u601d\u662f\u521b\u5efa\u5e76\u5207\u6362\u3002\u8fd9\u4e2a\u65b0\u5206\u652f\u5c06\u7528\u4e8e\u4f60\u7684\u4fee\u6539&#xff0c;\u547d\u540d\u5efa\u8bae\u89c1\u4e0b\u6587\u3002<\/li>\n<\/ul>\n<p>\u4e3a\u4ec0\u4e48\u4e0d\u5728 main \u4e0a\u76f4\u63a5\u6539&#xff1f; \u76f4\u63a5\u5728 main \u4e0a\u4fee\u6539\u4f1a\u4f7f\u4f60\u7684\u4e3b\u5206\u652f\u4e0e\u4e0a\u6e38\u4ea7\u751f\u5dee\u5f02&#xff0c;\u540e\u7eed\u5982\u679c\u9700\u8981\u540c\u6b65\u4e0a\u6e38\u66f4\u65b0\u4f1a\u53d8\u5f97\u6df7\u4e71\u3002\u521b\u5efa\u72ec\u7acb\u7684\u529f\u80fd\u5206\u652f&#xff0c;\u53ef\u4ee5\u8ba9\u4f60\u540c\u65f6\u5f00\u53d1\u591a\u4e2a\u529f\u80fd&#xff0c;\u4e5f\u4fbf\u4e8e\u7ef4\u62a4\u8005\u5ba1\u67e5\u2014\u2014\u4ed6\u4eec\u53ea\u770b\u5230\u8fd9\u4e2a\u5206\u652f\u4e0a\u7684\u6539\u52a8&#xff0c;\u6e05\u6670\u660e\u4e86\u3002<\/p>\n<h4>4. \u4fee\u6539\u3001\u63d0\u4ea4\u3001\u63a8\u5230\u4f60\u7684 Fork<\/h4>\n<p><span class=\"token function\">git<\/span> <span class=\"token function\">add<\/span> <span class=\"token builtin class-name\">.<\/span><br \/>\n<span class=\"token function\">git<\/span> commit <span class=\"token parameter variable\">-m<\/span> <span class=\"token string\">&#034;feat: \u63cf\u8ff0\u4f60\u7684\u4fee\u6539&#034;<\/span><br \/>\n<span class=\"token function\">git<\/span> push origin feature\/\u4f60\u7684\u529f\u80fd\u540d<\/p>\n<ul>\n<li>git add .&#xff1a;\u5c06\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u5df2\u4fee\u6539\u3001\u65b0\u589e\u7684\u6587\u4ef6\u6dfb\u52a0\u5230 Git \u7684\u6682\u5b58\u533a&#xff08;staging area&#xff09;\u3002\u4f60\u4e5f\u53ef\u4ee5\u6307\u5b9a\u5177\u4f53\u6587\u4ef6&#xff0c;\u6bd4\u5982 git add src\/index.js\u3002. \u662f\u901a\u914d\u7b26&#xff0c;\u8868\u793a\u5f53\u524d\u76ee\u5f55\u53ca\u5b50\u76ee\u5f55\u7684\u6240\u6709\u6539\u52a8\u3002<\/li>\n<li>git commit -m &#034;\u63d0\u4ea4\u4fe1\u606f&#034;&#xff1a;\u5c06\u6682\u5b58\u533a\u7684\u6539\u52a8\u6253\u5305\u6210\u4e00\u4e2a\u65b0\u7684\u63d0\u4ea4&#xff0c;\u5e76\u9644\u4e0a\u7b80\u77ed\u7684\u63cf\u8ff0\u3002\u63d0\u4ea4\u4fe1\u606f\u7684\u683c\u5f0f\u5efa\u8bae\u9075\u5faa\u793e\u533a\u89c4\u8303&#xff08;\u4f8b\u5982 Conventional Commits&#xff09;&#xff0c;\u540e\u9762\u4f1a\u4ecb\u7ecd\u3002<\/li>\n<li>git push origin feature\/\u4f60\u7684\u529f\u80fd\u540d&#xff1a;\u5c06\u672c\u5730\u5206\u652f feature\/\u4f60\u7684\u529f\u80fd\u540d \u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93 origin&#xff08;\u4e5f\u5c31\u662f\u4f60\u7684 Fork&#xff09;\u4e0a\u3002\u8fd9\u6837 GitHub \u4e0a\u5c31\u6709\u4e86\u4f60\u65b0\u5206\u652f\u7684\u4ee3\u7801&#xff0c;\u4e3a\u4e0b\u4e00\u6b65\u63d0 PR \u505a\u597d\u51c6\u5907\u3002<\/li>\n<\/ul>\n<h4>5. \u7f51\u9875\u7aef\u63d0\u4ea4 PR<\/h4>\n<li>\u6253\u5f00\u4f60\u7684 Fork \u4ed3\u5e93\u9875\u9762&#xff08;https:\/\/github.com\/\u4f60\u7684\u7528\u6237\u540d\/\u9879\u76ee\u540d&#xff09;&#xff0c;\u901a\u5e38\u4f1a\u51fa\u73b0\u4e00\u4e2a\u9ec4\u8272\u7684\u63d0\u793a\u6846 feature\/\u4f60\u7684\u529f\u80fd\u540d had recent pushes&#xff0c;\u5e76\u6709\u4e00\u4e2a Compare &amp; pull request \u6309\u94ae&#xff0c;\u70b9\u51fb\u5b83\u3002<\/li>\n<li>\u5982\u679c\u6ca1\u6709\u770b\u5230\u63d0\u793a&#xff0c;\u53ef\u4ee5\u70b9\u51fb\u4e0a\u65b9\u7684 Pull requests \u6807\u7b7e&#xff0c;\u7136\u540e\u70b9\u51fb\u7eff\u8272\u7684 New pull request \u6309\u94ae&#xff0c;\u518d\u70b9\u51fb compare across forks \u94fe\u63a5\u3002<\/li>\n<li>\u8fd9\u65f6\u4f1a\u8fdb\u5165 PR \u5bf9\u6bd4\u9875\u9762&#xff0c;\u9700\u8981\u6b63\u786e\u9009\u62e9\u56db\u4e2a\u5173\u952e\u9879&#xff1a;\n<ul>\n<li>base repository&#xff1a;\u539f\u9879\u76ee&#xff08;\u539f\u4f5c\u8005\/\u9879\u76ee\u540d&#xff09;&#xff0c;\u8868\u793a\u4f60\u60f3\u628a\u4ee3\u7801\u5408\u5e76\u5230\u54ea\u4e2a\u4ed3\u5e93\u3002<\/li>\n<li>base branch&#xff1a;\u539f\u9879\u76ee\u7684\u76ee\u6807\u5206\u652f&#xff0c;\u901a\u5e38\u662f main \u6216 master&#xff08;\u4e5f\u53ef\u80fd\u662f develop&#xff09;&#xff0c;\u4f60\u9700\u8981\u5c06\u4fee\u6539\u5408\u5e76\u5230\u8fd9\u4e2a\u5206\u652f\u3002<\/li>\n<li>head repository&#xff1a;\u4f60\u7684 Fork \u4ed3\u5e93&#xff08;\u4f60\u7684\u7528\u6237\u540d\/\u9879\u76ee\u540d&#xff09;\u3002<\/li>\n<li>compare branch&#xff1a;\u4f60\u521a\u521a\u63a8\u9001\u7684\u5206\u652f&#xff08;\u4f8b\u5982 feature\/\u4f60\u7684\u529f\u80fd\u540d&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u586b\u5199\u6807\u9898\u548c\u63cf\u8ff0\u3002\u6807\u9898\u5e94\u7b80\u6d01\u6982\u62ec\u6539\u52a8&#xff0c;\u63cf\u8ff0\u53ef\u4ee5\u8be6\u7ec6\u8bf4\u660e\u4f60\u4fee\u6539\u4e86\u4ec0\u4e48\u3001\u4e3a\u4ec0\u4e48\u4fee\u6539\u3001\u5982\u4f55\u6d4b\u8bd5&#xff0c;\u4ee5\u53ca\u662f\u5426\u6709\u4efb\u4f55\u6ce8\u610f\u4e8b\u9879\u3002\u63cf\u8ff0\u8d8a\u6e05\u6670&#xff0c;\u7ef4\u62a4\u8005\u5ba1\u6838\u8d8a\u5feb\u3002<\/li>\n<li>\u53ef\u9009&#xff1a;\u52fe\u9009 Allow edits from maintainers\u3002\u5982\u679c\u52fe\u9009&#xff0c;\u539f\u9879\u76ee\u7684\u7ef4\u62a4\u8005\u53ef\u4ee5\u76f4\u63a5\u5728\u4f60\u7684 PR \u5206\u652f\u4e0a\u63a8\u9001\u4fee\u6539&#xff0c;\u65b9\u4fbf\u4ed6\u4eec\u5e2e\u4f60\u89e3\u51b3\u4e00\u4e9b\u5c0f\u95ee\u9898\u6216\u51b2\u7a81\u3002<\/li>\n<li>\u70b9\u51fb Create pull request \u63d0\u4ea4\u3002<\/li>\n<p>\u81f3\u6b64&#xff0c;\u4f60\u7684 PR \u5c31\u6210\u529f\u63d0\u4ea4\u5230\u4e86\u539f\u9879\u76ee&#xff0c;\u7b49\u5f85\u7ef4\u62a4\u8005\u5ba1\u6838\u3002<\/p>\n<h4>6. \u540e\u7eed<\/h4>\n<p>\u63d0\u4ea4 PR \u4ee5\u540e&#xff0c;\u7531\u539f\u9879\u76ee\u7ef4\u62a4\u8005\u5ba1\u6838\u3001\u8bc4\u8bba\u3001\u5408\u5e76\u3002\u5728\u6b64\u671f\u95f4\u4f60\u53ef\u80fd\u4f1a\u6536\u5230\u53cd\u9988&#xff0c;\u9700\u8981\u6839\u636e\u5efa\u8bae\u4fee\u6539\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u5e38\u89c1\u7684\u540e\u7eed\u64cd\u4f5c&#xff1a;<\/p>\n<ul>\n<li>\u5982\u679c\u7ef4\u62a4\u8005\u8981\u6c42\u4fee\u6539&#xff1a;\u4f60\u53ef\u4ee5\u5728\u672c\u5730\u540c\u4e00\u4e2a\u5206\u652f\u4e0a\u7ee7\u7eed\u4fee\u6539&#xff0c;\u7136\u540e\u518d\u6b21 git add\u3001git commit\u3001git push origin \u4f60\u7684\u5206\u652f\u540d\u3002\u63a8\u9001\u540e PR \u4f1a\u81ea\u52a8\u66f4\u65b0&#xff0c;\u65e0\u9700\u91cd\u65b0\u521b\u5efa\u3002<\/li>\n<li>\u5982\u679c\u51fa\u73b0\u51b2\u7a81&#xff1a;\u5f53\u4f60\u7684 PR \u4e0e\u76ee\u6807\u5206\u652f&#xff08;\u4f8b\u5982 main&#xff09;\u7684\u6700\u65b0\u4ee3\u7801\u6709\u51b2\u7a81\u65f6&#xff0c;GitHub \u4f1a\u63d0\u793a\u201cThis branch has conflicts that must be resolved\u201d\u3002\u4f60\u9700\u8981\u5148\u5728\u672c\u5730\u89e3\u51b3\u51b2\u7a81&#xff1a;<span class=\"token function\">git<\/span> checkout main<br \/>\n<span class=\"token function\">git<\/span> pull upstream main         <span class=\"token comment\"># \u62c9\u53d6\u4e0a\u6e38\u6700\u65b0\u4ee3\u7801<\/span><br \/>\n<span class=\"token function\">git<\/span> checkout feature\/\u4f60\u7684\u529f\u80fd\u540d<br \/>\n<span class=\"token function\">git<\/span> merge main                 <span class=\"token comment\"># \u5c06 main \u5408\u5e76\u5230\u529f\u80fd\u5206\u652f&#xff0c;\u89e3\u51b3\u51b2\u7a81<\/span><br \/>\n<span class=\"token function\">git<\/span> push origin feature\/\u4f60\u7684\u529f\u80fd\u540d<br \/>\n \u63a8\u9001\u540e PR \u4e2d\u7684\u51b2\u7a81\u72b6\u6001\u4f1a\u81ea\u52a8\u66f4\u65b0\u3002\u6ce8\u610f&#xff1a;\u4e0d\u8981\u5728 GitHub \u7f51\u9875\u4e0a\u76f4\u63a5\u89e3\u51b3\u590d\u6742\u51b2\u7a81&#xff0c;\u6700\u597d\u5728\u672c\u5730\u6d4b\u8bd5\u540e\u518d\u63a8\u9001\u3002<\/li>\n<li>\u5982\u679c PR \u88ab\u5408\u5e76&#xff1a;\u606d\u559c\u4f60&#xff0c;\u4f60\u7684\u8d21\u732e\u5df2\u6210\u529f\u52a0\u5165\u539f\u9879\u76ee&#xff01;\u4e4b\u540e\u53ef\u4ee5\u540c\u6b65\u4f60\u7684 Fork \u4ee5\u4fdd\u6301\u6700\u65b0&#xff1a;<span class=\"token function\">git<\/span> checkout main<br \/>\n<span class=\"token function\">git<\/span> pull upstream main<br \/>\n<span class=\"token function\">git<\/span> push origin main           <span class=\"token comment\"># \u66f4\u65b0\u4f60\u7684 GitHub \u4e0a\u7684 main \u5206\u652f<\/span><br \/>\n \u7136\u540e\u53ef\u4ee5\u5220\u9664\u672c\u5730\u548c\u8fdc\u7a0b\u7684\u529f\u80fd\u5206\u652f&#xff08;\u53ef\u9009&#xff09;&#xff1a;<span class=\"token function\">git<\/span> branch <span class=\"token parameter variable\">-d<\/span> feature\/\u4f60\u7684\u529f\u80fd\u540d<br \/>\n<span class=\"token function\">git<\/span> push origin <span class=\"token parameter variable\">&#8211;delete<\/span> feature\/\u4f60\u7684\u529f\u80fd\u540d\n <\/li>\n<\/ul>\n<h3>\u5206\u652f\u547d\u540d\u65b9\u5f0f<\/h3>\n<p>\u5728\u521b\u5efa\u5206\u652f\u65f6&#xff0c;\u63a8\u8350\u4f7f\u7528\u4e0b\u9762\u7684\u5206\u652f\u547d\u540d\u683c\u5f0f&#xff1a;<\/p>\n<p>\u7c7b\u578b\/\u7b80\u77ed\u63cf\u8ff0<\/p>\n<p>\u6216<\/p>\n<p>\u7c7b\u578b-\u7b80\u77ed\u63cf\u8ff0<\/p>\n<p>\u8fd9\u79cd\u547d\u540d\u65b9\u5f0f\u80fd\u8ba9\u4f60&#xff08;\u548c\u9879\u76ee\u7ef4\u62a4\u8005&#xff09;\u4e00\u773c\u770b\u51fa\u5206\u652f\u7684\u7528\u9014&#xff0c;\u4e5f\u65b9\u4fbf\u540e\u671f\u81ea\u52a8\u5316\u811a\u672c\u8bc6\u522b\u3002<\/p>\n<h4>1. \u7c7b\u578b<\/h4>\n<ul>\n<li>fix\/&#xff1a;\u4fee\u590d bug<\/li>\n<li>feat\/&#xff1a;\u65b0\u589e\u529f\u80fd<\/li>\n<li>refactor\/&#xff1a;\u91cd\u6784\u4ee3\u7801&#xff08;\u4e0d\u6539\u53d8\u529f\u80fd&#xff09;<\/li>\n<li>docs\/&#xff1a;\u6587\u6863\u4fee\u6539<\/li>\n<li>style\/&#xff1a;\u683c\u5f0f\u3001\u7a7a\u683c\u3001\u5206\u53f7\u7b49&#xff08;\u4e0d\u5f71\u54cd\u4ee3\u7801\u8fd0\u884c&#xff09;<\/li>\n<li>test\/&#xff1a;\u6d4b\u8bd5\u76f8\u5173<\/li>\n<\/ul>\n<h4>2. \u63cf\u8ff0<\/h4>\n<ul>\n<li>\u5c0f\u5199\u82f1\u6587<\/li>\n<li>\u5355\u8bcd\u4e4b\u95f4\u7528 &#8211; \u8fde\u63a5<\/li>\n<li>\u7b80\u6d01\u8bf4\u660e\u505a\u4e86\u4ec0\u4e48<\/li>\n<\/ul>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>feat\/add-user-login-and-fix-api-error   # \u6dfb\u52a0\u7528\u6237\u767b\u5f55\u5e76\u4fee\u590d API \u9519\u8bef<br \/>\nfix\/login-bug-and-add-refresh-token      # \u4fee\u590d\u767b\u5f55 bug \u5e76\u6dfb\u52a0\u5237\u65b0\u4ee4\u724c<br \/>\ndocs\/update-readme-usage                  # \u66f4\u65b0 README \u4f7f\u7528\u8bf4\u660e<\/p>\n<p>\u56e2\u961f\u534f\u4f5c\u65f6&#xff0c;\u5206\u652f\u4e00\u591a\u5c31\u5bb9\u6613\u6df7\u4e71\u3002\u6e05\u6670\u7684\u547d\u540d\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5feb\u901f\u5207\u6362&#xff0c;\u4e5f\u8ba9 CI\/CD \u5de5\u5177\u80fd\u591f\u6839\u636e\u5206\u652f\u7c7b\u578b\u81ea\u52a8\u6267\u884c\u4e0d\u540c\u7684\u6d4b\u8bd5\u6216\u90e8\u7f72\u4efb\u52a1\u3002\u6bd4\u5982&#xff0c;\u53ea\u6709 feat\/ \u5206\u652f\u624d\u4f1a\u89e6\u53d1\u6784\u5efa\u9884\u89c8\u73af\u5883\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pull Request \u7b80\u4ecb<br \/>\n\u62c9\u53d6\u8bf7\u6c42&#xff08;Pull Request&#xff09;\u662f\u5c06\u4ee3\u7801\u4fee\u6539\u5408\u5e76\u5230\u9879\u76ee\u4e2d\u7684\u63d0\u8bae\u3002\u5b83\u662f GitHub \u7684\u6838\u5fc3\u534f\u4f5c\u529f\u80fd&#xff0c;\u652f\u6301\u5728\u5408\u5e76\u524d\u5bf9\u4fee\u6539\u8fdb\u884c\u8ba8\u8bba\u4e0e\u5ba1\u6838&#xff0c;\u6709\u52a9\u4e8e\u56e2\u961f\u534f\u4f5c\u3001\u5c3d\u65e9\u53d1\u73b0\u95ee\u9898\u5e76\u4fdd\u8bc1\u4ee3\u7801\u8d28\u91cf\u3002\u5728\u5f00\u6e90\u9879\u76ee\u4e2d&#xff0c;Pull Request \u88ab\u5e7f\u6cdb\u7528\u4e8e\u53c2\u4e0e\u793e\u533a\u8d21\u732e\u3002<br \/>\n\u5bf9\u4e8e GitHub \u4e0a\u5176\u4ed6\u4eba\u5efa\u7acb\u7684\u9879\u76ee&#xff0c;\u6211\u4eec\u60f3\u8981\u5bf9\u5176\u8fdb\u884c\u5b8c\u5584\u548c\u4fee\u6539&#xff0c;\u5e76\u5411\u9879\u76ee\u7684\u7ef4\u62a4\u8005\u63d0\u51fa\u5408\u5e76\u8bf7\u6c42\u65f6<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[89,92],"topic":[],"class_list":["post-80681","post","type-post","status-publish","format-standard","hentry","category-server","tag-git","tag-github"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>github\u534f\u4f5c\u529f\u80fdPull Request\uff08PR\uff09\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/80681.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"github\u534f\u4f5c\u529f\u80fdPull Request\uff08PR\uff09\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Pull Request \u7b80\u4ecb \u62c9\u53d6\u8bf7\u6c42&#xff08;Pull Request&#xff09;\u662f\u5c06\u4ee3\u7801\u4fee\u6539\u5408\u5e76\u5230\u9879\u76ee\u4e2d\u7684\u63d0\u8bae\u3002\u5b83\u662f GitHub \u7684\u6838\u5fc3\u534f\u4f5c\u529f\u80fd&#xff0c;\u652f\u6301\u5728\u5408\u5e76\u524d\u5bf9\u4fee\u6539\u8fdb\u884c\u8ba8\u8bba\u4e0e\u5ba1\u6838&#xff0c;\u6709\u52a9\u4e8e\u56e2\u961f\u534f\u4f5c\u3001\u5c3d\u65e9\u53d1\u73b0\u95ee\u9898\u5e76\u4fdd\u8bc1\u4ee3\u7801\u8d28\u91cf\u3002\u5728\u5f00\u6e90\u9879\u76ee\u4e2d&#xff0c;Pull Request \u88ab\u5e7f\u6cdb\u7528\u4e8e\u53c2\u4e0e\u793e\u533a\u8d21\u732e\u3002 \u5bf9\u4e8e GitHub \u4e0a\u5176\u4ed6\u4eba\u5efa\u7acb\u7684\u9879\u76ee&#xff0c;\u6211\u4eec\u60f3\u8981\u5bf9\u5176\u8fdb\u884c\u5b8c\u5584\u548c\u4fee\u6539&#xff0c;\u5e76\u5411\u9879\u76ee\u7684\u7ef4\u62a4\u8005\u63d0\u51fa\u5408\u5e76\u8bf7\u6c42\u65f6\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/80681.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-05T10:49:09+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/80681.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/80681.html\",\"name\":\"github\u534f\u4f5c\u529f\u80fdPull Request\uff08PR\uff09\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-03-05T10:49:09+00:00\",\"dateModified\":\"2026-03-05T10:49:09+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/80681.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/80681.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/80681.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"github\u534f\u4f5c\u529f\u80fdPull Request\uff08PR\uff09\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"github\u534f\u4f5c\u529f\u80fdPull Request\uff08PR\uff09\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/80681.html","og_locale":"zh_CN","og_type":"article","og_title":"github\u534f\u4f5c\u529f\u80fdPull Request\uff08PR\uff09\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Pull Request \u7b80\u4ecb \u62c9\u53d6\u8bf7\u6c42&#xff08;Pull Request&#xff09;\u662f\u5c06\u4ee3\u7801\u4fee\u6539\u5408\u5e76\u5230\u9879\u76ee\u4e2d\u7684\u63d0\u8bae\u3002\u5b83\u662f GitHub \u7684\u6838\u5fc3\u534f\u4f5c\u529f\u80fd&#xff0c;\u652f\u6301\u5728\u5408\u5e76\u524d\u5bf9\u4fee\u6539\u8fdb\u884c\u8ba8\u8bba\u4e0e\u5ba1\u6838&#xff0c;\u6709\u52a9\u4e8e\u56e2\u961f\u534f\u4f5c\u3001\u5c3d\u65e9\u53d1\u73b0\u95ee\u9898\u5e76\u4fdd\u8bc1\u4ee3\u7801\u8d28\u91cf\u3002\u5728\u5f00\u6e90\u9879\u76ee\u4e2d&#xff0c;Pull Request \u88ab\u5e7f\u6cdb\u7528\u4e8e\u53c2\u4e0e\u793e\u533a\u8d21\u732e\u3002 \u5bf9\u4e8e GitHub \u4e0a\u5176\u4ed6\u4eba\u5efa\u7acb\u7684\u9879\u76ee&#xff0c;\u6211\u4eec\u60f3\u8981\u5bf9\u5176\u8fdb\u884c\u5b8c\u5584\u548c\u4fee\u6539&#xff0c;\u5e76\u5411\u9879\u76ee\u7684\u7ef4\u62a4\u8005\u63d0\u51fa\u5408\u5e76\u8bf7\u6c42\u65f6","og_url":"https:\/\/www.wsisp.com\/helps\/80681.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-03-05T10:49:09+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/80681.html","url":"https:\/\/www.wsisp.com\/helps\/80681.html","name":"github\u534f\u4f5c\u529f\u80fdPull Request\uff08PR\uff09\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-03-05T10:49:09+00:00","dateModified":"2026-03-05T10:49:09+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/80681.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/80681.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/80681.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"github\u534f\u4f5c\u529f\u80fdPull Request\uff08PR\uff09\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/80681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=80681"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/80681\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=80681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=80681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=80681"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=80681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}