{"id":486,"date":"2026-03-09T15:00:59","date_gmt":"2026-03-09T07:00:59","guid":{"rendered":"https:\/\/docs.liuyaorobot.com\/?post_type=docs&#038;p=486"},"modified":"2026-03-09T15:01:51","modified_gmt":"2026-03-09T07:01:51","slug":"%e4%bb%a3%e7%a0%81%e6%89%98%e7%ae%a1","status":"publish","type":"docs","link":"https:\/\/docs.liuyaorobot.com\/?docs=%e4%bb%a3%e7%a0%81%e5%90%8c%e6%ad%a5%e4%b8%8e%e8%bf%81%e7%a7%bb\/%e4%bb%a3%e7%a0%81%e6%89%98%e7%ae%a1","title":{"rendered":"\u4ee3\u7801\u6258\u7ba1"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\" id=\"2-\u4ee3\u7801\u6258\u7ba1\">\u82e5\u4f7f\u7528\u4ee3\u7801\u6258\u7ba1\uff0c\u53ef\u4ee5\u4f18\u5148\u8003\u8651 Git\u3002Git \u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u5e7f\u6cdb\u7528\u4e8e\u8f6f\u4ef6\u5f00\u53d1\u548c\u5176\u4ed6\u7248\u672c\u63a7\u5236\u573a\u666f\u3002\u5b83\u53ef\u4ee5\u6709\u6548\u5730\u8ddf\u8e2a\u548c\u7ba1\u7406\u6587\u4ef6\u7684\u53d8\u5316\uff0c\u5c24\u5176\u9002\u7528\u4e8e\u56e2\u961f\u534f\u4f5c\u5f00\u53d1\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u8bb0\u5f55\u548c\u7ba1\u7406\u6e90\u4ee3\u7801\u7684\u7248\u672c\u5386\u53f2\u3002<\/h4>\n\n\n\n<p><strong>Git\u7684\u5b89\u88c5\u53ca\u914d\u7f6e\uff1a<\/strong> \u5728 Ubuntu \u684c\u9762\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\uff0c\u8fd0\u884c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt updatesudo apt install git<\/pre>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u9a8c\u8bc1 Git \u662f\u5426\u5b89\u88c5\u6210\u529f\uff0c\u5e76\u67e5\u770b\u5176\u7248\u672c\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">git --version<\/pre>\n\n\n\n<p>\u5b89\u88c5 Git \u540e\uff0c\u4f60\u8fd8\u9700\u8981\u914d\u7f6e\u4f60\u7684\u7528\u6237\u540d\u548c\u7535\u5b50\u90ae\u4ef6\u5730\u5740\uff0c\u8fd9\u5bf9\u6bcf\u6b21\u63d0\u4ea4\u90fd\u975e\u5e38\u91cd\u8981\u3002\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u914d\u7f6e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">git config --global user.name \"Your Name\"git config --global user.email \"your_email@example.com\"<\/pre>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b Git \u7684\u914d\u7f6e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">git config --list<\/pre>\n\n\n\n<p>\u914d\u7f6e\u5b8c\u6210\u5982\u4e0b\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static.simuro.liuyaorobot.com\/archive\/tutorial2025\/img\/1736411259591.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>\u8bbe\u7f6e\u4e3b\u90ae\u7bb1\uff1a<\/strong> \u6ce8\u518c\u767b\u5f55 Gitee\uff08<a href=\"https:\/\/gitee.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/gitee.com\/<\/a>\uff09 \uff0c\u6dfb\u52a0\u4e3b\u90ae\u7bb1\u4e3a\u81ea\u5df1\u672c\u5730 git \u4ed3\u5e93\u8bbe\u7f6e\u7684\u90ae\u7bb1\uff0c\u6ce8\u610f\u4e00\u5b9a\u8981\u548c\u4e0a\u9762\u914d\u7f6e\u7684\u90ae\u7bb1\u76f8\u540c\uff0c\u5426\u5219\u65e0\u6cd5\u6b63\u786e\u63d0\u4ea4\u3002 <img decoding=\"async\" src=\"https:\/\/static.simuro.liuyaorobot.com\/archive\/tutorial2025\/img\/1736412478149.jpg\" width=\"85%\"><\/p>\n\n\n\n<p><strong>\u65b0\u5efaGit\u4ed3\u5e93\uff1a<\/strong> \u8003\u8651\u5230\u90e8\u5206\u60c5\u51b5\u4e0b\u4f1a\u6709\u7f51\u7edc\u95ee\u9898\uff0c\u6240\u4ee5\u4e0d\u4f7f\u7528 GitHub\u3002\u4e3a\u4fdd\u62a4\u4ee3\u7801\u5b89\u5168\uff0c\u5efa\u8bae\u4fdd\u6301\u4ed3\u5e93\u72b6\u6001\u4e3a\u4e0d\u516c\u5f00\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static.simuro.liuyaorobot.com\/archive\/tutorial2025\/img\/1736408363665.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static.simuro.liuyaorobot.com\/archive\/tutorial2025\/img\/1736411633599.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>SSH\u914d\u7f6e\uff1a<\/strong> \u6211\u4eec\u53ef\u4ee5\u5728\u672c\u673a\u4e00\u6b21\u6027\u914d\u7f6e SSH \u4ee5\u540e\u514d\u5bc6\u767b\u5f55\uff0cSSH \u5bc6\u94a5\u7ec4\u6210\u548c\u4f5c\u7528\u5982\u4e0b\uff1a <strong>\u4f5c\u7528\uff1a<\/strong> \u5b9e\u73b0\u672c\u5730\u4ed3\u5e93\u548c gitee \u5e73\u53f0\u4e4b\u95f4\u514d\u767b\u5f55\u7684\u52a0\u5bc6\u6570\u636e\u4f20\u8f93 <strong>\u7ec4\u6210\uff1a<\/strong> id_rsa (\u79c1\u94a5\u6587\u4ef6\uff0c\u5b58\u653e\u4e8e\u5ba2\u6237\u7aef\u7684\u7535\u8111\u4e2d\u5373\u53ef)\u3001id_rsa.pub (\u516c\u94a5\u6587\u4ef6\uff0c\u9700\u8981\u914d\u7f6e\u5230 gitee \u5e73\u53f0\u4e2d)<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u79c1\u94a5\u52a0\u5bc6\u7684\u4fe1\u606f\uff0c\u53ea\u80fd\u901a\u8fc7\u516c\u94a5\u89e3\u5bc6\u3002\u516c\u94a5\u52a0\u5bc6\u7684\u4fe1\u606f\uff0c\u53ea\u80fd\u901a\u8fc7\u79c1\u94a5\u89e3\u5bc6\u3002\u5b89\u5168\u6027\u9ad8\uff01<\/p>\n<\/blockquote>\n\n\n\n<p>SSH \u5bc6\u94a5\u521b\u5efa\u4e0e\u4f7f\u7528\u6b65\u9aa4\uff1a 1\uff09\u5148\u5728\u672c\u673a\uff08Windows\/Ubuntu\u5747\u53ef\uff09\u751f\u6210\u4e00\u4e2a\u5bc6\u94a5 (\u4ee5\u540e\u4e5f\u53ef\u4ee5\u91cd\u65b0\u751f\u6210\u3001\u91cd\u65b0\u914d\u7f6e)\uff0c\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh-keygen -t rsa -C \"alec0617@163.com\" #\u4f60\u7684\u90ae\u7bb1 <\/pre>\n\n\n\n<p>2\uff09\u8fde\u7eed\u6572\u51fb\u4e09\u6b21\u56de\u8f66\uff0c\u5373\u53ef\u5728\u6839\u76ee\u5f55 .ssh \u6587\u4ef6\u5939\u4e0b\u751f\u6210 id_rsa \u548c id_rsa.pub \u4e24\u4e2a\u6587\u4ef6\u3002<\/p>\n\n\n\n<p>3\uff09\u4f7f\u7528 VSCode \u6253\u5f00 id_rsa.pub \u6587\u4ef6\uff0c\u5982\u679c\u662f Ubuntu \u5219\u5728\u5f53\u524d\u76ee\u5f55\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cat id_rsa.pub <\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static.simuro.liuyaorobot.com\/archive\/tutorial2025\/img\/1736415373311.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>5\uff09\u590d\u5236\u8f93\u51fa\u7684\u516c\u94a5\uff0c\u6253\u5f00 Gitee \u2192 \u4e2a\u4eba\u8bbe\u7f6e \u2192 \u5b89\u5168\u8bbe\u7f6e \u2192 SSH \u516c\u94a5\uff0c\u5c06\u516c\u94a5\u7c98\u8d34\u5230\u8fd9\u91cc\uff0c\u70b9\u51fb\u786e\u5b9a\u5373\u914d\u7f6e\u5b8c\u6210\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static.simuro.liuyaorobot.com\/archive\/tutorial2025\/img\/1736415817276.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>\u5c06\u672c\u5730\u4ee3\u7801\u63a8\u9001\u81f3\u8fdc\u7a0bgit\u4ed3\u5e93\uff1a<\/strong> \u4f60\u53ef\u4ee5\u5229\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u672c\u5730\u4ed3\u5e93\uff08\u76f8\u5f53\u4e8e\u5f00\u53d1\u73af\u5883\uff09\uff0c\u5e76\u5c06\u5176\u63a8\u9001\u81f3\u8fdc\u7a0b\u4ed3\u5e93\u4e2d\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#\u521b\u5efa\u672c\u5730example\u76ee\u5f55mkdir example &nbsp;#\u8fdb\u5165\u5230example\u76ee\u5f55\u4e2dcd example &nbsp;#\u5c06\u5f53\u524d\u76ee\u5f55\u521d\u59cb\u5316\u4e3a\u4e00\u4e2aGit\u4ed3\u5e93git init &nbsp;#\u521b\u5efaREADME.mdtouch README.md &nbsp;\n#\u5c06README.md\u6dfb\u52a0\u5230Git\u7684\u6682\u5b58\u533agit add README.md &nbsp;#\u5c06\u6682\u5b58\u533a\u7684\u66f4\u6539\u63d0\u4ea4\u5230\u672c\u5730\u4ed3\u5e93\uff0c\u5e76\u9644\u4e0a\"first commit\"\u7684\u63d0\u4ea4\u4fe1\u606fgit commit -m \"first commit\" &nbsp;#\u5c06\u8fdc\u7a0b\u4ed3\u5e93\u6dfb\u52a0\u5230\u672c\u5730Git\u4ed3\u5e93\u4e2d\uff0c\u5e76\u6307\u5b9a\u8be5\u8fdc\u7a0b\u4ed3\u5e93\u7684\u540d\u79f0\u4e3aorigingit remote add origin git@gitee.com:alec0617\/magpie360.git &nbsp;#\u5c06\u672c\u5730master\u5206\u652f\u7684\u5185\u5bb9\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93origin\u4e0a\u7684master\u5206\u652fgit push -u origin \"master\" &nbsp;<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>-u \u9009\u9879\u4f1a\u5c06\u672c\u5730\u5206\u652f\u4e0e\u8fdc\u7a0b\u5206\u652f\u5173\u8054\u8d77\u6765\uff0c\u4ee5\u540e\u4f60\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528 git push\u548c git pull\uff0c\u65e0\u9700\u6bcf\u6b21\u6307\u5b9a\u8fdc\u7a0b\u4ed3\u5e93\u548c\u5206\u652f\u540d\u79f0\u3002<\/p>\n<\/blockquote>\n\n\n\n<p><strong>\u514b\u9686\u8fdc\u7a0b\u4ed3\u5e93\u4ee3\u7801\uff1a<\/strong> \u5728\u677f\u8f7d\u8ba1\u7b97\u673a\uff08\u76f8\u5f53\u4e8e\u751f\u4ea7\u73af\u5883\uff09\u7684\u5408\u9002\u76ee\u5f55\u4e0b\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\uff0c\u8f93\u5165\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">git clone git@gitee.com:alec0617\/magpie360.git<\/pre>\n\n\n\n<p>\u5373\u53ef\u5c06\u8fdc\u7a0b\u4ed3\u5e93\u4e2d\u7684\u4ee3\u7801\u4e0b\u8f7d\u5230\u677f\u8f7d\u8ba1\u7b97\u673a\u4e2d\uff0c\u968f\u540e\u5b8c\u6210\u76f8\u5e94\u90e8\u7f72\u7f16\u8bd1\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u82e5\u4f7f\u7528\u4ee3\u7801\u6258\u7ba1\uff0c\u53ef\u4ee5\u4f18\u5148\u8003\u8651 Git\u3002Git \u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u5e7f\u6cdb\u7528\u4e8e\u8f6f\u4ef6\u5f00\u53d1\u548c\u5176\u4ed6\u7248\u672c\u63a7\u5236\u573a\u666f\u3002\u5b83 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":482,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","categories":[],"doc_label":[],"doc_tag":[],"class_list":["post-486","docs","type-docs","status-publish","format-standard","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/docs\/486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=486"}],"version-history":[{"count":1,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/docs\/486\/revisions"}],"predecessor-version":[{"id":487,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/docs\/486\/revisions\/487"}],"up":[{"embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/docs\/482"}],"wp:attachment":[{"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=486"},{"taxonomy":"doc_label","embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_label&post=486"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}