{"id":20020,"date":"2024-11-19T15:34:33","date_gmt":"2024-11-19T07:34:33","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20020\/"},"modified":"2024-11-19T15:34:33","modified_gmt":"2024-11-19T07:34:33","slug":"%e6%80%8e%e4%b9%88%e5%85%8b%e9%9a%86github%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20020\/","title":{"rendered":"\u600e\u4e48\u514b\u9686github\u4ee3\u7801"},"content":{"rendered":"<p>\u5728\u8fd1\u5e74\u6765\u7684\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0cgithub\u5df2\u7ecf\u6210\u4e3a\u7a0b\u5e8f\u5458\u4eec\u5fc5\u4e0d\u53ef\u5c11\u7684\u5728\u7ebf\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\u4e4b\u4e00\u3002\u5bf9\u4e8e\u4e00\u4e9b\u76f8\u540c\u6216\u7c7b\u4f3c\u7684\u9879\u76ee\uff0c\u4ece\u5934\u5f00\u59cb\u7f16\u5199\u4ee3\u7801\u8d39\u65f6\u8d39\u529b\uff0c\u6b64\u65f6\u501f\u9274\u6216\u91cd\u590d\u5229\u7528\u5df2\u6709\u7684\u4ee3\u7801\u5c31\u6210\u4e3a\u4e86\u4e00\u79cd\u5e38\u89c1\u7684\u65b9\u5f0f\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4ecegithub\u4e0a\u514b\u9686\u4ee3\u7801\u3002<\/p>\n<p>\u4e00\u3001\u4e86\u89e3Git<\/p>\n<p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5148\u4e86\u89e3\u4e00\u4e0bGit\u3002Git\u662f\u4e00\u79cd\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u5b83\u901a\u8fc7\u5bf9\u4ee3\u7801\u8fdb\u884c\u7248\u672c\u7ba1\u7406\uff0c\u4f7f\u5f97\u591a\u4eba\u534f\u540c\u5f00\u53d1\u7684\u8fc7\u7a0b\u66f4\u52a0\u9ad8\u6548\u3001\u53ef\u9760\u3002\u5728Git\u4e2d\uff0c\u6bcf\u4e00\u4e2a\u7248\u672c\u4ee3\u7801\u90fd\u662f\u7ecf\u8fc7\u6807\u8bb0\u4e14\u4e0d\u53ef\u53d8\u7684\uff0c\u5f53\u9700\u8981\u4fee\u6539\u4ee3\u7801\u65f6\uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5206\u652f\u6765\u8fdb\u884c\u6539\u52a8\uff0c\u5e76\u5728\u6700\u7ec8\u5408\u5e76\u5206\u652f\u540e\u8fdb\u884c\u63d0\u4ea4\u3002<\/p>\n<p>\u4e8c\u3001 Github\u4e0a\u627e\u5230\u9700\u8981\u514b\u9686\u7684\u4ee3\u7801<\/p>\n<p>\u5728Github\u4e0a\u641c\u7d22\u9700\u8981\u7684\u4ee3\u7801\u5e93\uff0c\u5bf9\u4e8e\u8f83\u5927\u7684\u5f00\u6e90\u9879\u76ee\uff0c\u5e94\u8be5\u5148\u6d4f\u89c8\u4e00\u4e0b\u201cREADME\u201d\u6587\u4ef6\uff0c\u4e86\u89e3\u4ee3\u7801\u5e93\u7684\u76f8\u5173\u4fe1\u606f\u3002<\/p>\n<p>\u4e09\u3001\u514b\u9686\u4ee3\u7801<\/p>\n<ol>\n<li>\u524d\u5f80Github\uff0c\u767b\u5f55\u4f60\u7684\u8d26\u53f7\u3002<\/li>\n<li>\u5728\u4ee3\u7801\u5e93\u53f3\u4fa7\u627e\u5230\u7eff\u8272\u7684\u201cClone or download\u201d\u6309\u94ae\uff0c\u70b9\u51fb\u6253\u5f00\u83dc\u5355\u3002<\/li>\n<li>\u590d\u5236\u4e0b\u9762\u663e\u793a\u7684\u94fe\u63a5\u5730\u5740\u3002<\/li>\n<li>\u6253\u5f00\u7ec8\u7aef\u6216\u547d\u4ee4\u884c\u754c\u9762\uff08Windows\u4e0b\u8fdb\u5165\u547d\u4ee4\u884c\u7684\u65b9\u6cd5\u662f\u5728\u201c\u8fd0\u884c\u201d\u4e2d\u8f93\u5165\u201ccmd\u201d\u5e76\u56de\u8f66\uff09\uff0c\u5e76\u8fdb\u5165\u4f60\u60f3\u8981\u5b58\u653e\u514b\u9686\u7684\u4ee3\u7801\u7684\u76ee\u5f55\uff0c\u4f7f\u7528cd\u547d\u4ee4\u3002\u4f8b\u5982\uff1a<\/li>\n<\/ol>\n<pre>cd \/Users\/abc\/Desktop\/<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u4f7f\u7528 git clone \u547d\u4ee4\u6765\u514b\u9686\u4ee3\u7801\uff0c\u5177\u4f53\u547d\u4ee4\u5982\u4e0b\uff1a<\/li>\n<\/ol>\n<pre>git clone \u8981\u514b\u9686\u7684\u4ee3\u7801\u94fe\u63a5\u5730\u5740<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre>git clone https:\/\/github.com\/abc\/repository-name.git<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u514b\u9686\u8fc7\u7a0b\u4e2d\uff0c\u7535\u8111\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u6574\u4e2a\u4ee3\u7801\u5e93\u5230\u672c\u5730\u3002\u5982\u679c\u4f60\u5df2\u7ecf\u514b\u9686\u4e86\u4e00\u6b21\uff0c\u53ef\u4ee5\u4f7f\u7528 git pull \u547d\u4ee4\u6765\u66f4\u65b0\u672c\u5730\u4ee3\u7801\u5e93\u7684\u4ee3\u7801\uff1a<\/li>\n<\/ol>\n<pre>git pull<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u56db\u3001Git\u7684\u4f7f\u7528\u53ca\u76f8\u5173\u547d\u4ee4<\/p>\n<ol>\n<li>\u67e5\u770b\u672c\u5730\u4ee3\u7801\u5e93\u72b6\u6001<\/li>\n<\/ol>\n<p>\u4f7f\u7528 git status \u547d\u4ee4\u6765\u67e5\u770b\u672c\u5730\u4ee3\u7801\u5e93\u72b6\u6001\u3002\u5b83\u4f1a\u663e\u793a\u51fa\u672c\u5730\u4ee3\u7801\u5e93\u7684\u60c5\u51b5\uff0c\u5982\u5f53\u524d\u6240\u5728\u5206\u652f\u3001\u4fee\u6539\u7684\u6587\u4ef6\u548c\u672a\u6682\u5b58\u7684\u6587\u4ef6\u7b49\u4fe1\u606f\u3002<\/p>\n<ol>\n<li>\u6dfb\u52a0\u4fee\u6539\u7684\u6587\u4ef6<\/li>\n<\/ol>\n<p>\u4f7f\u7528 git add \u547d\u4ee4\u6dfb\u52a0\u4fee\u6539\u7684\u6587\u4ef6\u5230\u5de5\u4f5c\u533a\u3002\u4f8b\u5982\uff0c\u6dfb\u52a0\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\uff1a<\/p>\n<pre>git add .<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u63d0\u4ea4\u4fee\u6539<\/li>\n<\/ol>\n<p>\u4f7f\u7528 git commit \u547d\u4ee4\u63d0\u4f9b\u8bf4\u660e\u4fe1\u606f\u5e76\u63d0\u4ea4\u4fee\u6539\uff1a<\/p>\n<pre>git commit -m \"\u4fee\u6539\u63cf\u8ff0\"<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u63a8\u9001\u4fee\u6539\u5230\u8fdc\u7a0b\u4ed3\u5e93<\/li>\n<\/ol>\n<p>\u4f7f\u7528 git push \u547d\u4ee4\u63a8\u9001\u4fee\u6539\u5230\u8fdc\u7a0b\u4ed3\u5e93\uff1a<\/p>\n<pre>git push<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u5206\u652f\u7ba1\u7406<\/li>\n<\/ol>\n<p>\u4f7f\u7528 git checkout \u547d\u4ee4\u6765\u5207\u6362\u5206\u652f\uff0c\u4f7f\u7528 git branch \u547d\u4ee4\u6765\u67e5\u770b\u6240\u6709\u5206\u652f\u4fe1\u606f\uff0c\u4f7f\u7528 git merge \u547d\u4ee4\u5c06\u5206\u652f\u5408\u5e76\u81f3\u4e3b\u5206\u652f\u3002<\/p>\n<pre>git checkout \u5206\u652f\u540d    # \u5207\u6362\u5206\u652f\ngit branch            # \u67e5\u770b\u6240\u6709\u5206\u652f\ngit merge \u5206\u652f\u540d       # \u5408\u5e76\u5206\u652f<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4e94\u3001\u603b\u7ed3<\/p>\n<p>Github\u4f5c\u4e3a\u76ee\u524d\u6280\u672f\u793e\u533a\u4e2d\u6700\u5927\u7684\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u4e3a\u7a0b\u5e8f\u5458\u63d0\u4f9b\u4e86\u514d\u8d39\u3001\u65b9\u4fbf\u3001\u5feb\u6377\u7684\u4ee3\u7801\u6258\u7ba1\u670d\u52a1\u3002\u5728\u8fd9\u91cc\uff0c\u4f60\u53ef\u4ee5\u6d4f\u89c8\u522b\u4eba\u7684\u4ee3\u7801\uff0c\u5e76\u4e14\u53ef\u4ee5\u5c06\u81ea\u5df1\u7684\u4ee3\u7801\u5206\u4eab\u7ed9\u5168\u4e16\u754c\u7684\u7a0b\u5e8f\u5458\u3002\u5982\u679c\u4f60\u9700\u8981\u4f7f\u7528\u67d0\u4e2a\u9879\u76ee\u7684\u4ee3\u7801\uff0c\u53ea\u9700\u5728Github\u4e0a\u627e\u5230\u5b83\uff0c\u4f7f\u7528git clone\u547d\u4ee4\uff0c\u4fbf\u53ef\u5728\u672c\u5730\u83b7\u5f97\u5b8c\u6574\u7684\u9879\u76ee\u4ee3\u7801\u3002<\/p>\n<p>\u4e0d\u8fc7\uff0c\u5728\u4f7f\u7528Github\u65f6\u4e5f\u9700\u6ce8\u610f\u4ee3\u7801\u7248\u6743\u95ee\u9898\uff0c\u4ee5\u4fdd\u8bc1\u7a0b\u5e8f\u5458\u95f4\u7684\u5171\u540c\u5229\u76ca\u3002\u5e0c\u671b\u5927\u5bb6\u5728Github\u4e0a\u4e92\u76f8\u5b66\u4e60\u3001\u4ea4\u6d41\u548c\u5206\u4eab\u4ee3\u7801\u7684\u540c\u65f6\uff0c\u4e5f\u9700\u8981\u4e25\u683c\u9075\u5b88\u5404\u9879\u89c4\u5b9a\u548c\u534f\u8bae\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u514b\u9686github\u4ee3\u7801\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\u8fd1\u5e74\u6765\u7684\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0cgithub\u5df2\u7ecf\u6210\u4e3a\u7a0b\u5e8f\u5458\u4eec\u5fc5\u4e0d\u53ef\u5c11\u7684\u5728\u7ebf\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\u4e4b\u4e00\u3002\u5bf9\u4e8e\u4e00\u4e9b\u76f8\u540c\u6216\u7c7b\u4f3c\u7684\u9879\u76ee\uff0c\u4ece\u5934\u5f00\u59cb\u7f16\u5199\u4ee3\u7801\u8d39\u65f6\u8d39\u529b\uff0c\u6b64\u65f6\u501f\u9274\u6216\u91cd\u590d\u5229\u7528\u5df2\u6709\u7684\u4ee3\u7801\u5c31\u6210\u4e3a\u4e86\u4e00\u79cd\u5e38\u89c1\u7684\u65b9\u5f0f\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4ecegithub\u4e0a\u514b\u9686\u4ee3\u7801\u3002 \u4e00\u3001\u4e86\u89e3Git \u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5148\u4e86\u89e3\u4e00\u4e0bGit\u3002Git\u662f\u4e00\u79cd\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u5b83\u901a\u8fc7\u5bf9\u4ee3\u7801\u8fdb\u884c\u7248\u672c\u7ba1\u7406\uff0c\u4f7f\u5f97\u591a\u4eba\u534f\u540c\u5f00\u53d1\u7684\u8fc7\u7a0b\u66f4\u52a0\u9ad8\u6548\u3001\u53ef\u9760\u3002\u5728Git\u4e2d\uff0c\u6bcf\u4e00\u4e2a\u7248\u672c\u4ee3\u7801\u90fd\u662f\u7ecf\u8fc7\u6807\u8bb0\u4e14\u4e0d\u53ef\u53d8\u7684\uff0c\u5f53\u9700\u8981\u4fee\u6539\u4ee3\u7801\u65f6\uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5206\u652f\u6765\u8fdb\u884c\u6539\u52a8\uff0c\u5e76\u5728\u6700\u7ec8\u5408\u5e76\u5206\u652f\u540e\u8fdb\u884c\u63d0\u4ea4\u3002 \u4e8c\u3001 Github\u4e0a\u627e\u5230\u9700\u8981\u514b\u9686\u7684\u4ee3\u7801 \u5728Github\u4e0a\u641c\u7d22\u9700\u8981\u7684\u4ee3\u7801\u5e93\uff0c\u5bf9\u4e8e\u8f83\u5927\u7684\u5f00\u6e90\u9879\u76ee\uff0c\u5e94\u8be5\u5148\u6d4f\u89c8\u4e00\u4e0b\u201cREADME\u201d\u6587\u4ef6\uff0c\u4e86\u89e3\u4ee3\u7801\u5e93\u7684\u76f8\u5173\u4fe1\u606f\u3002 \u4e09\u3001\u514b\u9686\u4ee3\u7801 \u524d\u5f80Github\uff0c\u767b\u5f55\u4f60\u7684\u8d26\u53f7\u3002 \u5728\u4ee3\u7801\u5e93\u53f3\u4fa7\u627e\u5230\u7eff\u8272\u7684\u201cClone or download\u201d\u6309\u94ae\uff0c\u70b9\u51fb\u6253\u5f00\u83dc\u5355\u3002 \u590d\u5236\u4e0b\u9762\u663e\u793a\u7684\u94fe\u63a5\u5730\u5740\u3002 \u6253\u5f00\u7ec8\u7aef\u6216\u547d\u4ee4\u884c\u754c\u9762\uff08Windows\u4e0b\u8fdb\u5165\u547d\u4ee4\u884c\u7684\u65b9\u6cd5\u662f\u5728\u201c\u8fd0\u884c\u201d\u4e2d\u8f93\u5165\u201ccmd\u201d\u5e76\u56de\u8f66\uff09\uff0c\u5e76\u8fdb\u5165\u4f60\u60f3\u8981\u5b58\u653e\u514b\u9686\u7684\u4ee3\u7801\u7684\u76ee\u5f55\uff0c\u4f7f\u7528cd\u547d\u4ee4\u3002\u4f8b\u5982\uff1a cd \/Users\/abc\/Desktop\/ \u767b\u5f55\u540e\u590d\u5236 \u4f7f\u7528 git clone \u547d\u4ee4\u6765\u514b\u9686\u4ee3\u7801\uff0c\u5177\u4f53\u547d\u4ee4\u5982\u4e0b\uff1a git clone \u8981\u514b\u9686\u7684\u4ee3\u7801\u94fe\u63a5\u5730\u5740 \u767b\u5f55\u540e\u590d\u5236 \u793a\u4f8b\uff1a git clone https:\/\/github.com\/abc\/repository-name.git \u767b\u5f55\u540e\u590d\u5236 \u514b\u9686\u8fc7\u7a0b\u4e2d\uff0c\u7535\u8111\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u6574\u4e2a\u4ee3\u7801\u5e93\u5230\u672c\u5730\u3002\u5982\u679c\u4f60\u5df2\u7ecf\u514b\u9686\u4e86\u4e00\u6b21\uff0c\u53ef\u4ee5\u4f7f\u7528 git pull \u547d\u4ee4\u6765\u66f4\u65b0\u672c\u5730\u4ee3\u7801\u5e93\u7684\u4ee3\u7801\uff1a git pull \u767b\u5f55\u540e\u590d\u5236 \u56db\u3001Git\u7684\u4f7f\u7528\u53ca\u76f8\u5173\u547d\u4ee4 \u67e5\u770b\u672c\u5730\u4ee3\u7801\u5e93\u72b6\u6001 \u4f7f\u7528 git status \u547d\u4ee4\u6765\u67e5\u770b\u672c\u5730\u4ee3\u7801\u5e93\u72b6\u6001\u3002\u5b83\u4f1a\u663e\u793a\u51fa\u672c\u5730\u4ee3\u7801\u5e93\u7684\u60c5\u51b5\uff0c\u5982\u5f53\u524d\u6240\u5728\u5206\u652f\u3001\u4fee\u6539\u7684\u6587\u4ef6\u548c\u672a\u6682\u5b58\u7684\u6587\u4ef6\u7b49\u4fe1\u606f\u3002 \u6dfb\u52a0\u4fee\u6539\u7684\u6587\u4ef6 \u4f7f\u7528 git add \u547d\u4ee4\u6dfb\u52a0\u4fee\u6539\u7684\u6587\u4ef6\u5230\u5de5\u4f5c\u533a\u3002\u4f8b\u5982\uff0c\u6dfb\u52a0\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\uff1a git add . \u767b\u5f55\u540e\u590d\u5236 \u63d0\u4ea4\u4fee\u6539 \u4f7f\u7528 git commit [&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-20020","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20020","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=20020"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20020\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}