{"id":19597,"date":"2024-11-19T12:10:13","date_gmt":"2024-11-19T04:10:13","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19597\/"},"modified":"2024-11-19T12:10:13","modified_gmt":"2024-11-19T04:10:13","slug":"%e8%af%a6%e8%a7%a3%e5%a6%82%e4%bd%95%e5%9c%a8win%e7%b3%bb%e7%bb%9f%e4%b8%ad%e6%90%ad%e5%bb%ba%e8%87%aa%e5%b7%b1%e7%9a%84git%e8%bf%9c%e7%a8%8b%e4%bb%93%e5%ba%93","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19597\/","title":{"rendered":"\u8be6\u89e3\u5982\u4f55\u5728Win\u7cfb\u7edf\u4e2d\u642d\u5efa\u81ea\u5df1\u7684Git\u8fdc\u7a0b\u4ed3\u5e93"},"content":{"rendered":"<p>\u5728\u8fd9\u4e2a\u4fe1\u606f\u5316\u7684\u65f6\u4ee3\uff0c\u7a0b\u5e8f\u5458\u4eec\u5fc5\u7136\u4f1a\u7ecf\u5e38\u4f7f\u7528\u7248\u672c\u63a7\u5236\u5de5\u5177\u6765\u65b9\u4fbf\u7ba1\u7406\u81ea\u5df1\u7684\u4ee3\u7801\uff0cgit\u4f5c\u4e3a\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u7684\u4ee3\u8868\uff0c\u5df2\u7ecf\u6210\u4e3a\u4e86\u7a0b\u5e8f\u5458\u5fc5\u5907\u7684\u6280\u80fd\u4e4b\u4e00\u3002\u5728\u6211\u4eec\u5e73\u65f6\u7684\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u901a\u5e38\u5c06\u672c\u5730\u7684\u4ee3\u7801\u63d0\u4ea4\u5230\u8fdc\u7a0b\u4ed3\u5e93\u4e2d\uff0c\u4ee5\u4fbf\u5c06\u4ee3\u7801\u540c\u6b65\u5230\u5176\u4ed6\u8ba1\u7b97\u673a\u4e0a\u3002<\/p>\n<p>\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u4f1a\u8bb2\u89e3\u5982\u4f55\u5728Windows\u7cfb\u7edf\u4e2d\u642d\u5efa\u81ea\u5df1\u7684Git\u8fdc\u7a0b\u4ed3\u5e93\uff0c\u8ba9\u4f60\u7684\u4ee3\u7801\u66f4\u597d\u5730\u7ba1\u7406\u548c\u534f\u4f5c\u3002<\/p>\n<h2>\u5b89\u88c5Git<\/h2>\n<p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5728\u4f60\u7684Windows\u7cfb\u7edf\u4e0a\u5b89\u88c5Git\u3002\u4f60\u53ef\u4ee5\u5728Git\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0a\u4e0b\u8f7d\u6700\u65b0\u7248\u7684Git\u8fdb\u884c\u5b89\u88c5\u3002\u4e0b\u8f7d\u5b89\u88c5\u5305\u5e76\u6253\u5f00\uff0c\u63a5\u4e0b\u6765\u4f1a\u51fa\u73b0\u5b89\u88c5\u5411\u5bfc\u3002<\/p>\n<p>\u5728\u5b89\u88c5\u7684\u65f6\u5019\uff0c\u5efa\u8bae\u9009\u62e9\u9ed8\u8ba4\u9009\u9879\uff0c\u9664\u975e\u4f60\u77e5\u9053\u81ea\u5df1\u9700\u8981\u9009\u62e9\u54ea\u4e9b\u9009\u9879\u3002<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u9a8c\u8bc1Git\u7684\u5b89\u88c5\u662f\u5426\u6210\u529f\uff1a<\/p>\n<pre>git --version<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c\u8fd4\u56de\u4e86\u7248\u672c\u53f7\uff0c\u5219\u8bf4\u660eGit\u5df2\u7ecf\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<h2>\u521b\u5efaGit\u4ed3\u5e93<\/h2>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2aGit\u8fdc\u7a0b\u4ed3\u5e93\u3002\u5728Git\u4e2d\uff0c\u6bcf\u4e2a\u4ed3\u5e93\u90fd\u6709\u4e00\u4e2a\u72ec\u7acb\u7684.git\u6587\u4ef6\u5939\uff0c\u8fd9\u4e2a\u6587\u4ef6\u5939\u5b58\u50a8\u4e86\u4e0e\u8fd9\u4e2a\u4ed3\u5e93\u76f8\u5173\u7684\u6240\u6709\u5143\u6570\u636e\u4fe1\u606f\u548c\u5bf9\u8c61\u6570\u636e\u5e93\u3002<\/p>\n<p>\u5728Windows\u4e2d\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u5728\u672c\u5730\u5efa\u7acb\u4e00\u4e2aGit\u4ed3\u5e93\uff0c\u6216\u8005\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5efa\u7acb\u4e00\u4e2aGit\u4ed3\u5e93\u3002<\/p>\n<h3>\u672c\u5730\u4ed3\u5e93<\/h3>\n<p>\u5728\u672c\u5730\u5efa\u7acbGit\u4ed3\u5e93\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\uff1a<\/p>\n<pre>mkdir my_project\ncd my_project\ngit init<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u5c06\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2amy_project\u6587\u4ef6\u5939\uff0c\u7136\u540e\u4f7f\u7528git init\u547d\u4ee4\u521d\u59cb\u5316\u8be5\u6587\u4ef6\u5939\u4e3aGit\u4ed3\u5e93\u3002<\/p>\n<h3>\u8fdc\u7a0b\u4ed3\u5e93<\/h3>\n<p>\u5982\u679c\u4f60\u60f3\u8981\u521b\u5efa\u4e00\u4e2aGit\u8fdc\u7a0b\u4ed3\u5e93\uff0c\u6709\u4ee5\u4e0b\u4e24\u79cd\u65b9\u6cd5\uff1a<\/p>\n<h4>\u521b\u5efa\u88f8\u4ed3\u5e93\uff08Bare Repository\uff09<\/h4>\n<p>\u88f8\u4ed3\u5e93\u662f\u4e0d\u5305\u542b\u5de5\u4f5c\u76ee\u5f55\u7684Git\u4ed3\u5e93\uff0c\u5b83\u88ab\u8bbe\u8ba1\u7528\u6765\u5171\u4eab\u4ee3\u7801\uff0c\u4e0d\u9700\u8981\u5728\u670d\u52a1\u5668\u4e0a\u8fd0\u884cGit\u7684\u7528\u6237\u754c\u9762\u3002\u5728\u521b\u5efa\u88f8\u4ed3\u5e93\u65f6\uff0c\u4f60\u9700\u8981\u6307\u5b9a\u4e00\u4e2a\u76ee\u5f55\u6765\u5b58\u50a8\u8be5\u4ed3\u5e93\u7684.git\u6587\u4ef6\u5939\uff0c\u4ee5\u53ca\u8be5\u4ed3\u5e93\u7684\u540d\u79f0\u3002<\/p>\n<pre>mkdir my_project.git\ncd my_project.git\ngit init --bare<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u5c06\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2amy_project.git\u6587\u4ef6\u5939\uff0c\u7136\u540e\u4f7f\u7528git init &#8211;bare\u547d\u4ee4\u521d\u59cb\u5316\u8be5\u6587\u4ef6\u5939\u4e3a\u4e00\u4e2a\u88f8\u4ed3\u5e93\u3002<\/p>\n<h4>\u4f7f\u7528GitHub<\/h4>\n<p>\u5982\u679c\u4f60\u4f7f\u7528GitHub\uff0c\u53ef\u4ee5\u901a\u8fc7\u7f51\u9875\u754c\u9762\u521b\u5efa\u4e00\u4e2aGit\u8fdc\u7a0b\u4ed3\u5e93\u3002\u5728\u4f60\u7684GitHub\u4e0a\uff0c\u70b9\u51fb\u201cNew repository\u201d\uff0c\u7136\u540e\u586b\u5199\u76f8\u5e94\u4fe1\u606f\u5373\u53ef\u3002<\/p>\n<h2>\u4e3a\u4ed3\u5e93\u6dfb\u52a0\u6743\u9650<\/h2>\n<p>\u5728\u8fdc\u7a0b\u4ed3\u5e93\u4e2d\uff0c\u4f60\u9700\u8981\u4e3a\u4f60\u7684\u8d26\u6237\u6dfb\u52a0\u5199\u6743\u9650\u3002\u6253\u5f00\u4f60\u7684GitHub\u4e0a\u65b0\u521b\u5efa\u7684\u4ed3\u5e93\u9875\u9762\uff0c\u70b9\u51fb\u201cSettings\u201d\u9009\u9879\u5361\uff0c\u7136\u540e\u70b9\u51fb\u201cCollaborators\u201d\uff0c\u5728\u5176\u4e2d\u6dfb\u52a0\u4f60\u7684GitHub\u8d26\u6237\u6216\u8005\u56e2\u961f\u7684\u8d26\u6237\u5373\u53ef\u3002<\/p>\n<p>\u5982\u679c\u4f60\u521b\u5efa\u7684\u662f\u88f8\u4ed3\u5e93\uff0c\u5219\u53ef\u4ee5\u76f4\u63a5\u5728\u670d\u52a1\u5668\u4e0a\u4e3a\u4f60\u7684\u8d26\u6237\u6216\u56e2\u961f\u6dfb\u52a0\u6743\u9650\uff0c\u5177\u4f53\u64cd\u4f5c\u53ef\u4ee5\u53c2\u8003Git\u5b98\u65b9\u6587\u6863\u3002<\/p>\n<h2>\u914d\u7f6eSSH<\/h2>\n<p>\u4e3a\u4e86\u80fd\u591f\u8fde\u63a5\u5230\u4f60\u7684\u8fdc\u7a0bGit\u4ed3\u5e93\uff0c\u4f60\u9700\u8981\u8bbe\u7f6eSSH\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>ssh-keygen -t rsa -b 4096 -C \"your_email@example.com\"<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u5c06\u4f1a\u751f\u6210\u4e00\u5bf9SSH\u94a5\u5319\uff0c\u5176\u4e2dyour_email@example.com\u4e3a\u4f60\u7684GitHub\u6216GitLab\u6ce8\u518c\u90ae\u7bb1\u3002\u6309\u7167\u63d0\u793a\u4e00\u6b65\u6b65\u8fdb\u884c\uff0c\u6700\u7ec8\u5c06\u4f1a\u751f\u6210\u4e00\u4e2aid_rsa\u79c1\u94a5\u548c\u4e00\u4e2aid_rsa.pub\u516c\u94a5\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u9700\u8981\u5c06\u516c\u94a5\u6dfb\u52a0\u5230\u4f60\u7684GitHub\u6216GitLab\u8d26\u6237\u4e2d\u3002\u590d\u5236\u516c\u94a5\u4e2d\u7684\u6240\u6709\u5185\u5bb9\uff0c\u7136\u540e\u5728\u7f51\u9875\u4e2d\u6dfb\u52a0\u5230\u4f60\u7684\u8d26\u6237\u4e0a\u5373\u53ef\u3002<\/p>\n<h2>\u5c06\u4ee3\u7801\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93<\/h2>\n<p>\u73b0\u5728\u4f60\u5df2\u7ecf\u53ef\u4ee5\u8bbf\u95ee\u4f60\u7684\u8fdc\u7a0bGit\u4ed3\u5e93\u4e86\uff0c\u63a5\u4e0b\u6765\u6211\u4eec\u5c31\u53ef\u4ee5\u5c06\u4ee3\u7801\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93\u4e2d\u3002<\/p>\n<p>\u5728\u672c\u5730\u4ed3\u5e93\u4e2d\uff0c\u521b\u5efa\u4e00\u4e2aREADME\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u6dfb\u52a0\u5230Git\u4ed3\u5e93\u4e2d\uff1a<\/p>\n<pre>echo \"# my_project\" &gt;&gt; README.md\ngit add README.md\ngit commit -m \"Add README\"<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u5c06\u4ee3\u7801\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93\u4e2d\uff1a<\/p>\n<pre>git remote add origin git@github.com:your_username\/my_project.git\ngit push -u origin master<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5176\u4e2d\uff0c\u66ff\u6362your_username\u4e3a\u4f60\u7684GitHub\u8d26\u6237\u540d\uff0cmy_project\u4e3a\u4f60\u7684Git\u4ed3\u5e93\u540d\u79f0\u3002<\/p>\n<h2>\u7ed3\u8bba<\/h2>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u4f60\u5df2\u7ecf\u53ef\u4ee5\u5728Windows\u7cfb\u7edf\u4e0a\u642d\u5efa\u81ea\u5df1\u7684Git\u8fdc\u7a0b\u4ed3\u5e93\uff0c\u5e76\u4e14\u6210\u529f\u5c06\u672c\u5730\u4ee3\u7801\u63d0\u4ea4\u5230\u4e86\u8fdc\u7a0b\u4ed3\u5e93\u4e2d\u3002Git\u4f5c\u4e3a\u4e00\u4e2a\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u53ef\u4ee5\u5e2e\u52a9\u56e2\u961f\u5feb\u901f\u9ad8\u6548\u5730\u534f\u4f5c\uff0c\u4f7f\u5f97\u4ee3\u7801\u66f4\u52a0\u65b9\u4fbf\u3001\u7a33\u5b9a\u3002\u5728\u6211\u4eec\u7684\u65e5\u5e38\u5f00\u53d1\u4e2d\uff0c\u719f\u7ec3\u638c\u63e1Git\u662f\u975e\u5e38\u91cd\u8981\u7684\u6280\u80fd\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u8be6\u89e3\u5982\u4f55\u5728Win\u7cfb\u7edf\u4e2d\u642d\u5efa\u81ea\u5df1\u7684Git\u8fdc\u7a0b\u4ed3\u5e93\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\u8fd9\u4e2a\u4fe1\u606f\u5316\u7684\u65f6\u4ee3\uff0c\u7a0b\u5e8f\u5458\u4eec\u5fc5\u7136\u4f1a\u7ecf\u5e38\u4f7f\u7528\u7248\u672c\u63a7\u5236\u5de5\u5177\u6765\u65b9\u4fbf\u7ba1\u7406\u81ea\u5df1\u7684\u4ee3\u7801\uff0cgit\u4f5c\u4e3a\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u7684\u4ee3\u8868\uff0c\u5df2\u7ecf\u6210\u4e3a\u4e86\u7a0b\u5e8f\u5458\u5fc5\u5907\u7684\u6280\u80fd\u4e4b\u4e00\u3002\u5728\u6211\u4eec\u5e73\u65f6\u7684\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u901a\u5e38\u5c06\u672c\u5730\u7684\u4ee3\u7801\u63d0\u4ea4\u5230\u8fdc\u7a0b\u4ed3\u5e93\u4e2d\uff0c\u4ee5\u4fbf\u5c06\u4ee3\u7801\u540c\u6b65\u5230\u5176\u4ed6\u8ba1\u7b97\u673a\u4e0a\u3002 \u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u4f1a\u8bb2\u89e3\u5982\u4f55\u5728Windows\u7cfb\u7edf\u4e2d\u642d\u5efa\u81ea\u5df1\u7684Git\u8fdc\u7a0b\u4ed3\u5e93\uff0c\u8ba9\u4f60\u7684\u4ee3\u7801\u66f4\u597d\u5730\u7ba1\u7406\u548c\u534f\u4f5c\u3002 \u5b89\u88c5Git \u9996\u5148\uff0c\u4f60\u9700\u8981\u5728\u4f60\u7684Windows\u7cfb\u7edf\u4e0a\u5b89\u88c5Git\u3002\u4f60\u53ef\u4ee5\u5728Git\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0a\u4e0b\u8f7d\u6700\u65b0\u7248\u7684Git\u8fdb\u884c\u5b89\u88c5\u3002\u4e0b\u8f7d\u5b89\u88c5\u5305\u5e76\u6253\u5f00\uff0c\u63a5\u4e0b\u6765\u4f1a\u51fa\u73b0\u5b89\u88c5\u5411\u5bfc\u3002 \u5728\u5b89\u88c5\u7684\u65f6\u5019\uff0c\u5efa\u8bae\u9009\u62e9\u9ed8\u8ba4\u9009\u9879\uff0c\u9664\u975e\u4f60\u77e5\u9053\u81ea\u5df1\u9700\u8981\u9009\u62e9\u54ea\u4e9b\u9009\u9879\u3002 \u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u9a8c\u8bc1Git\u7684\u5b89\u88c5\u662f\u5426\u6210\u529f\uff1a git &#8211;version \u767b\u5f55\u540e\u590d\u5236 \u5982\u679c\u8fd4\u56de\u4e86\u7248\u672c\u53f7\uff0c\u5219\u8bf4\u660eGit\u5df2\u7ecf\u5b89\u88c5\u6210\u529f\u3002 \u521b\u5efaGit\u4ed3\u5e93 \u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2aGit\u8fdc\u7a0b\u4ed3\u5e93\u3002\u5728Git\u4e2d\uff0c\u6bcf\u4e2a\u4ed3\u5e93\u90fd\u6709\u4e00\u4e2a\u72ec\u7acb\u7684.git\u6587\u4ef6\u5939\uff0c\u8fd9\u4e2a\u6587\u4ef6\u5939\u5b58\u50a8\u4e86\u4e0e\u8fd9\u4e2a\u4ed3\u5e93\u76f8\u5173\u7684\u6240\u6709\u5143\u6570\u636e\u4fe1\u606f\u548c\u5bf9\u8c61\u6570\u636e\u5e93\u3002 \u5728Windows\u4e2d\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u5728\u672c\u5730\u5efa\u7acb\u4e00\u4e2aGit\u4ed3\u5e93\uff0c\u6216\u8005\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5efa\u7acb\u4e00\u4e2aGit\u4ed3\u5e93\u3002 \u672c\u5730\u4ed3\u5e93 \u5728\u672c\u5730\u5efa\u7acbGit\u4ed3\u5e93\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\uff1a mkdir my_project cd my_project git init \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u4e2a\u547d\u4ee4\u5c06\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2amy_project\u6587\u4ef6\u5939\uff0c\u7136\u540e\u4f7f\u7528git init\u547d\u4ee4\u521d\u59cb\u5316\u8be5\u6587\u4ef6\u5939\u4e3aGit\u4ed3\u5e93\u3002 \u8fdc\u7a0b\u4ed3\u5e93 \u5982\u679c\u4f60\u60f3\u8981\u521b\u5efa\u4e00\u4e2aGit\u8fdc\u7a0b\u4ed3\u5e93\uff0c\u6709\u4ee5\u4e0b\u4e24\u79cd\u65b9\u6cd5\uff1a \u521b\u5efa\u88f8\u4ed3\u5e93\uff08Bare Repository\uff09 \u88f8\u4ed3\u5e93\u662f\u4e0d\u5305\u542b\u5de5\u4f5c\u76ee\u5f55\u7684Git\u4ed3\u5e93\uff0c\u5b83\u88ab\u8bbe\u8ba1\u7528\u6765\u5171\u4eab\u4ee3\u7801\uff0c\u4e0d\u9700\u8981\u5728\u670d\u52a1\u5668\u4e0a\u8fd0\u884cGit\u7684\u7528\u6237\u754c\u9762\u3002\u5728\u521b\u5efa\u88f8\u4ed3\u5e93\u65f6\uff0c\u4f60\u9700\u8981\u6307\u5b9a\u4e00\u4e2a\u76ee\u5f55\u6765\u5b58\u50a8\u8be5\u4ed3\u5e93\u7684.git\u6587\u4ef6\u5939\uff0c\u4ee5\u53ca\u8be5\u4ed3\u5e93\u7684\u540d\u79f0\u3002 mkdir my_project.git cd my_project.git git init &#8211;bare \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u4e2a\u547d\u4ee4\u5c06\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2amy_project.git\u6587\u4ef6\u5939\uff0c\u7136\u540e\u4f7f\u7528git init &#8211;bare\u547d\u4ee4\u521d\u59cb\u5316\u8be5\u6587\u4ef6\u5939\u4e3a\u4e00\u4e2a\u88f8\u4ed3\u5e93\u3002 \u4f7f\u7528GitHub \u5982\u679c\u4f60\u4f7f\u7528GitHub\uff0c\u53ef\u4ee5\u901a\u8fc7\u7f51\u9875\u754c\u9762\u521b\u5efa\u4e00\u4e2aGit\u8fdc\u7a0b\u4ed3\u5e93\u3002\u5728\u4f60\u7684GitHub\u4e0a\uff0c\u70b9\u51fb\u201cNew repository\u201d\uff0c\u7136\u540e\u586b\u5199\u76f8\u5e94\u4fe1\u606f\u5373\u53ef\u3002 \u4e3a\u4ed3\u5e93\u6dfb\u52a0\u6743\u9650 \u5728\u8fdc\u7a0b\u4ed3\u5e93\u4e2d\uff0c\u4f60\u9700\u8981\u4e3a\u4f60\u7684\u8d26\u6237\u6dfb\u52a0\u5199\u6743\u9650\u3002\u6253\u5f00\u4f60\u7684GitHub\u4e0a\u65b0\u521b\u5efa\u7684\u4ed3\u5e93\u9875\u9762\uff0c\u70b9\u51fb\u201cSettings\u201d\u9009\u9879\u5361\uff0c\u7136\u540e\u70b9\u51fb\u201cCollaborators\u201d\uff0c\u5728\u5176\u4e2d\u6dfb\u52a0\u4f60\u7684GitHub\u8d26\u6237\u6216\u8005\u56e2\u961f\u7684\u8d26\u6237\u5373\u53ef\u3002 \u5982\u679c\u4f60\u521b\u5efa\u7684\u662f\u88f8\u4ed3\u5e93\uff0c\u5219\u53ef\u4ee5\u76f4\u63a5\u5728\u670d\u52a1\u5668\u4e0a\u4e3a\u4f60\u7684\u8d26\u6237\u6216\u56e2\u961f\u6dfb\u52a0\u6743\u9650\uff0c\u5177\u4f53\u64cd\u4f5c\u53ef\u4ee5\u53c2\u8003Git\u5b98\u65b9\u6587\u6863\u3002 \u914d\u7f6eSSH \u4e3a\u4e86\u80fd\u591f\u8fde\u63a5\u5230\u4f60\u7684\u8fdc\u7a0bGit\u4ed3\u5e93\uff0c\u4f60\u9700\u8981\u8bbe\u7f6eSSH\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a ssh-keygen -t rsa -b 4096 -C &#8220;your_email@example.com&#8221; [&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-19597","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19597","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=19597"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19597\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}