{"id":19375,"date":"2024-11-19T08:17:37","date_gmt":"2024-11-19T00:17:37","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19375\/"},"modified":"2024-11-19T08:17:37","modified_gmt":"2024-11-19T00:17:37","slug":"%e8%af%a6%e8%a7%a3gitee%e4%b8%8a%e4%bc%a0%e9%a1%b9%e7%9b%ae%e7%9a%84%e6%ad%a5%e9%aa%a4","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19375\/","title":{"rendered":"\u8be6\u89e3gitee\u4e0a\u4f20\u9879\u76ee\u7684\u6b65\u9aa4"},"content":{"rendered":"<p>gitee \u4f5c\u4e3a\u56fd\u5185\u6700\u5927\u7684 git \u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\u4e4b\u4e00\uff0c\u662f\u4f17\u591a\u5f00\u53d1\u8005\u5e38\u7528\u7684\u5de5\u5177\u4e4b\u4e00\u3002\u5728\u8fd9\u91cc\uff0c\u60a8\u53ef\u4ee5\u4e0a\u4f20\u81ea\u5df1\u7684\u9879\u76ee\u4ee3\u7801\u5e76\u8fdb\u884c\u7ba1\u7406\u3002\u4e0b\u9762\u5c06\u4e3a\u60a8\u4ecb\u7ecd\u4e00\u4e0b\uff0c\u5728 gitee \u4e0a\u4e0a\u4f20\u9879\u76ee\u7684\u5177\u4f53\u6b65\u9aa4\u3002<\/p>\n<p>1.\u6ce8\u518c\u53ca\u767b\u5f55 Gitee<\/p>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u6ce8\u518c\u5e76\u767b\u5f55 Gitee \u8d26\u6237\u3002\u53ea\u6709\u6210\u4e3a Gitee \u7684\u7528\u6237\u540e\uff0c\u60a8\u624d\u80fd\u4e0a\u4f20\u548c\u7ba1\u7406\u60a8\u7684\u9879\u76ee\u4ee3\u7801\u3002<\/p>\n<p>2.\u65b0\u5efa\u4ed3\u5e93<\/p>\n<p>\u5728\u767b\u5f55\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u8fdb\u5165 &#8220;\u6211\u7684\u4ee3\u7801&#8221; \u9009\u62e9 &#8220;\u521b\u5efa\u65b0\u4ed3\u5e93&#8221;\u3002\u5728\u8fd9\u91cc\uff0c\u60a8\u53ef\u4ee5\u8fdb\u884c\u9879\u76ee\u4fe1\u606f\u7684\u586b\u5199\uff0c\u5305\u62ec\u4ed3\u5e93\u540d\u79f0\u3001\u63cf\u8ff0\u3001\u534f\u8bae\u7b49\u7b49\u3002<\/p>\n<p>3.\u521b\u5efa\u9879\u76ee\u6587\u4ef6\u5939<\/p>\n<p>\u5728\u60a8\u7684\u7535\u8111\u4e0a\uff0c\u4f7f\u7528 Git \u547d\u4ee4\u884c\u6216\u8005\u56fe\u5f62\u5316\u5de5\u5177\u521b\u5efa\u76f8\u5e94\u7684\u9879\u76ee\u6587\u4ef6\u5939\u3002\u5728\u8fd9\u91cc\u6211\u4eec\u4ee5\u547d\u4ee4\u884c\u4e3a\u4f8b\uff1a<\/p>\n<p>$ mkdir your_project_name # \u521b\u5efa\u9879\u76ee\u6587\u4ef6\u5939<br \/>$ cd your_project_name # \u8fdb\u5165\u9879\u76ee\u6587\u4ef6\u5939<\/p>\n<p>4.\u521d\u59cb\u5316 Git \u4ed3\u5e93<\/p>\n<p>\u5728\u8fd9\u4e00\u6b65\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528 Git \u5de5\u5177\u5c06\u9879\u76ee\u6587\u4ef6\u5939\u8f6c\u5316\u4e3a Git \u4ed3\u5e93\u3002<\/p>\n<p>$ git init<br \/>Initialized empty Git repository in \/your_project_path\/.git\/<\/p>\n<p>5.\u6dfb\u52a0\u6587\u4ef6<\/p>\n<p>\u5c06\u9700\u8981\u4e0a\u4f20\u7684\u6587\u4ef6\u62f7\u8d1d\u5230\u9879\u76ee\u6587\u4ef6\u5939\u4e0b<\/p>\n<p>$ cp \/path\/to\/your\/file your_project_name\/<\/p>\n<p>6.\u6dfb\u52a0\u8fdc\u7a0b\u4ed3\u5e93<\/p>\n<p>\u5728\u5b8c\u6210\u4e86\u672c\u5730\u4ed3\u5e93\u7684\u521d\u59cb\u5316\u5e76\u6dfb\u52a0\u4e86\u9879\u76ee\u6587\u4ef6\u540e\uff0c\u9700\u8981\u5c06\u4ed3\u5e93\u4e0e Gitee \u4e0a\u7684\u4ed3\u5e93\u8fdb\u884c\u5173\u8054\u3002<\/p>\n<p>$ git remote add origin https:\/\/gitee.com\/your_username\/your_project_name.git<\/p>\n<h1>\u6ce8\u610f\u5c06 your_username \u548c your_project_name \u66ff\u6362\u4e3a\u60a8\u7684 Gitee \u7528\u6237\u540d\u548c\u9879\u76ee\u540d\u79f0<\/h1>\n<p>7.\u4e0a\u4f20\u6587\u4ef6<\/p>\n<p>\u5728\u5b8c\u6210\u4e86\u672c\u5730\u4ed3\u5e93\u4e0e\u8fdc\u7a0b\u4ed3\u5e93\u7684\u5173\u8054\u4e4b\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u672c\u5730\u7684\u6587\u4ef6\u63a8\u9001\u5230\u8fdc\u7a0b\u7684\u9879\u76ee\u4ed3\u5e93\u3002<\/p>\n<p>$ git add .<br \/>$ git commit -m &#8220;Initial commit&#8221;<br \/>$ git push origin master<\/p>\n<p>\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528\u4e86 \u201cgit add\u201d \u5c06\u9879\u76ee\u4e2d\u6240\u7528\u5230\u7684\u6587\u4ef6\u5168\u90e8\u6dfb\u52a0\u5230\u4e86\u7d22\u5f15\u4e2d\uff0c\u518d\u4f7f\u7528 \u201cgit commit\u201d \u5c06\u7d22\u5f15\u63d0\u4ea4\u5230\u4e86\u4ee3\u7801\u4ed3\u5e93\u4e2d\u3002<\/p>\n<p>8.\u67e5\u770b\u4e0a\u4f20\u7ed3\u679c<\/p>\n<p>\u4e0a\u4f20\u6210\u529f\u540e\uff0c\u60a8\u53ef\u4ee5\u5728 Gitee \u4e0a\u627e\u5230\u81ea\u5df1\u7684\u9879\u76ee\uff0c\u67e5\u770b\u5df2\u7ecf\u6210\u529f\u4e0a\u4f20\u7684\u6587\u4ef6\u548c\u4ee3\u7801\u3002<\/p>\n<p>\u4ee5\u4e0a\u4fbf\u662f Gitee \u4e0a\u4f20\u9879\u76ee\u7684\u6b65\u9aa4\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 Git \u547d\u4ee4\u884c\u6216\u8005\u56fe\u5f62\u5316\u5de5\u5177\uff0c\u5728 Gitee \u4e0a\u8fdb\u884c\u9879\u76ee\u4ee3\u7801\u7684\u4e0a\u4f20\u548c\u7ba1\u7406\u3002\u5e0c\u671b\u672c\u6587\u80fd\u591f\u5bf9\u60a8\u5728\u5904\u7406\u9879\u76ee\u65f6\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u8be6\u89e3gitee\u4e0a\u4f20\u9879\u76ee\u7684\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>gitee \u4f5c\u4e3a\u56fd\u5185\u6700\u5927\u7684 git \u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\u4e4b\u4e00\uff0c\u662f\u4f17\u591a\u5f00\u53d1\u8005\u5e38\u7528\u7684\u5de5\u5177\u4e4b\u4e00\u3002\u5728\u8fd9\u91cc\uff0c\u60a8\u53ef\u4ee5\u4e0a\u4f20\u81ea\u5df1\u7684\u9879\u76ee\u4ee3\u7801\u5e76\u8fdb\u884c\u7ba1\u7406\u3002\u4e0b\u9762\u5c06\u4e3a\u60a8\u4ecb\u7ecd\u4e00\u4e0b\uff0c\u5728 gitee \u4e0a\u4e0a\u4f20\u9879\u76ee\u7684\u5177\u4f53\u6b65\u9aa4\u3002 1.\u6ce8\u518c\u53ca\u767b\u5f55 Gitee \u9996\u5148\uff0c\u60a8\u9700\u8981\u6ce8\u518c\u5e76\u767b\u5f55 Gitee \u8d26\u6237\u3002\u53ea\u6709\u6210\u4e3a Gitee \u7684\u7528\u6237\u540e\uff0c\u60a8\u624d\u80fd\u4e0a\u4f20\u548c\u7ba1\u7406\u60a8\u7684\u9879\u76ee\u4ee3\u7801\u3002 2.\u65b0\u5efa\u4ed3\u5e93 \u5728\u767b\u5f55\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u8fdb\u5165 &#8220;\u6211\u7684\u4ee3\u7801&#8221; \u9009\u62e9 &#8220;\u521b\u5efa\u65b0\u4ed3\u5e93&#8221;\u3002\u5728\u8fd9\u91cc\uff0c\u60a8\u53ef\u4ee5\u8fdb\u884c\u9879\u76ee\u4fe1\u606f\u7684\u586b\u5199\uff0c\u5305\u62ec\u4ed3\u5e93\u540d\u79f0\u3001\u63cf\u8ff0\u3001\u534f\u8bae\u7b49\u7b49\u3002 3.\u521b\u5efa\u9879\u76ee\u6587\u4ef6\u5939 \u5728\u60a8\u7684\u7535\u8111\u4e0a\uff0c\u4f7f\u7528 Git \u547d\u4ee4\u884c\u6216\u8005\u56fe\u5f62\u5316\u5de5\u5177\u521b\u5efa\u76f8\u5e94\u7684\u9879\u76ee\u6587\u4ef6\u5939\u3002\u5728\u8fd9\u91cc\u6211\u4eec\u4ee5\u547d\u4ee4\u884c\u4e3a\u4f8b\uff1a $ mkdir your_project_name # \u521b\u5efa\u9879\u76ee\u6587\u4ef6\u5939$ cd your_project_name # \u8fdb\u5165\u9879\u76ee\u6587\u4ef6\u5939 4.\u521d\u59cb\u5316 Git \u4ed3\u5e93 \u5728\u8fd9\u4e00\u6b65\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528 Git \u5de5\u5177\u5c06\u9879\u76ee\u6587\u4ef6\u5939\u8f6c\u5316\u4e3a Git \u4ed3\u5e93\u3002 $ git initInitialized empty Git repository in \/your_project_path\/.git\/ 5.\u6dfb\u52a0\u6587\u4ef6 \u5c06\u9700\u8981\u4e0a\u4f20\u7684\u6587\u4ef6\u62f7\u8d1d\u5230\u9879\u76ee\u6587\u4ef6\u5939\u4e0b $ cp \/path\/to\/your\/file your_project_name\/ 6.\u6dfb\u52a0\u8fdc\u7a0b\u4ed3\u5e93 \u5728\u5b8c\u6210\u4e86\u672c\u5730\u4ed3\u5e93\u7684\u521d\u59cb\u5316\u5e76\u6dfb\u52a0\u4e86\u9879\u76ee\u6587\u4ef6\u540e\uff0c\u9700\u8981\u5c06\u4ed3\u5e93\u4e0e [&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-19375","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19375","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=19375"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19375\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}