{"id":20260,"date":"2024-11-19T14:07:22","date_gmt":"2024-11-19T06:07:22","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20260\/"},"modified":"2024-11-19T14:07:22","modified_gmt":"2024-11-19T06:07:22","slug":"%e5%a6%82%e4%bd%95%e6%a3%80%e6%9f%a5%e8%87%aa%e5%b7%b1%e7%94%b5%e8%84%91%e4%b8%8a%e6%9c%89git","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20260\/","title":{"rendered":"\u5982\u4f55\u68c0\u67e5\u81ea\u5df1\u7535\u8111\u4e0a\u6709git"},"content":{"rendered":"<p>\u5728\u73b0\u4ee3\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0cgit \u5df2\u6210\u4e3a\u4e3b\u6d41\u7248\u672c\u63a7\u5236\u5de5\u5177\u3002\u5bf9\u4e8e\u5f00\u53d1\u4eba\u5458\u6765\u8bf4\uff0c\u638c\u63e1 git \u7684\u57fa\u7840\u77e5\u8bc6\u662f\u5fc5\u8981\u7684\u3002\u7136\u800c\uff0c\u6709\u65f6\u5019\uff0c\u6211\u4eec\u9700\u8981\u5728\u81ea\u5df1\u7684\u7535\u8111\u4e0a\u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86 git\u3002\u90a3\u4e48\uff0c\u8be5\u5982\u4f55\u68c0\u67e5\u81ea\u5df1\u7535\u8111\u4e0a\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86 git \u5462\uff1f<\/p>\n<p>\u4ee5\u4e0b\u662f\u51e0\u79cd\u68c0\u67e5 Git \u5b89\u88c5\u72b6\u6001\u7684\u65b9\u6cd5\uff1a<\/p>\n<p>\u65b9\u6cd5\u4e00\uff1a\u6253\u5f00\u7ec8\u7aef<\/p>\n<p>\u9996\u5148\uff0c\u6253\u5f00\u7ec8\u7aef\uff0c\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>git &#8211;version<\/p>\n<p>\u5982\u679c\u4f60\u770b\u5230\u8f93\u51fa\u7684\u7248\u672c\u53f7\uff0c\u90a3\u4e48\u8bf4\u660e Git \u5df2\u6210\u529f\u5b89\u88c5\u5728\u4f60\u7684\u7535\u8111\u4e0a\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<p>git version 2.24.3 (Apple Git-128)<\/p>\n<p>\u4ee5\u4e0a\u547d\u4ee4\u4f1a\u8f93\u51fa\u5f53\u524d Git \u7684\u7248\u672c\u4fe1\u606f\u3002\u5982\u679c\u6ca1\u6709\u8fd9\u6837\u7684\u8f93\u51fa\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u5b89\u88c5 Git\u3002<\/p>\n<p>\u65b9\u6cd5\u4e8c\uff1a\u5728 Git Bash \u4e2d\u68c0\u67e5<\/p>\n<p>Git Bash \u662f\u4e00\u4e2a\u4e3a Windows \u8bbe\u8ba1\u7684\u7ec8\u7aef\u4eff\u771f\u5668\uff0c\u5b83\u652f\u6301\u4f7f\u7528 Git \u547d\u4ee4\u884c\u5de5\u5177\u3002\u5982\u679c\u4f60\u5728 Windows \u5e73\u53f0\u4e0a\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528 Git Bash \u6765\u68c0\u67e5 Git \u662f\u5426\u5df2\u5b89\u88c5\u3002<\/p>\n<p>\u9996\u5148\uff0c\u6253\u5f00 Git Bash \u7ec8\u7aef\uff0c\u5e76\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>git &#8211;version<\/p>\n<p>\u5982\u679c Git \u4ee5\u6b63\u786e\u7684\u65b9\u5f0f\u5b89\u88c5\uff0c\u90a3\u4e48 Git Bash \u5df2\u7ecf\u663e\u793a\u5b89\u88c5\u7684 Git \u7684\u7248\u672c\u3002\u5982\u679c Git \u6ca1\u6709\u88ab\u81ea\u52a8\u5b89\u88c5\uff0c\u5efa\u8bae\u53ef\u4ee5\u5728 Git \u5b98\u65b9\u7f51\u7ad9\u4e0a\u4e0b\u8f7d\u548c\u5b89\u88c5\u6700\u65b0\u7684 Git \u7248\u672c\u3002<\/p>\n<p>\u65b9\u6cd5\u4e09\uff1a\u5728IDE\u4e2d\u67e5\u770bGit\u63d2\u4ef6<\/p>\n<p>\u5982\u679c\u4f60\u4f7f\u7528\u7684\u5f00\u53d1\u73af\u5883\u662f Visual Studio Code\u3001IntelliJ IDEA\u3001Eclipse \u6216 Xcode \u7b49\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u90a3\u4e48\u53ef\u4ee5\u5728\u8fd9\u4e9b IDE \u4e2d\u68c0\u67e5 Git \u63d2\u4ef6\u7684\u72b6\u6001\u3002<\/p>\n<p>\u5728 Visual Studio Code \u4e2d\uff0c\u4f60\u53ef\u4ee5\u6253\u5f00\u201c\u6269\u5c55\u201d\u9762\u677f\uff0c\u5e76\u641c\u7d22\u201cGit\u201d\u3002\u5982\u679c Git \u5df2\u5b89\u88c5\u5e76\u8fd0\u884c\uff0c\u4f60\u4f1a\u5728\u6269\u5c55\u5217\u8868\u4e2d\u770b\u5230 Git \u76f8\u5173\u7684\u63d2\u4ef6\u3002\u5982\u679c\u6ca1\u6709\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u4f60\u9700\u8981\u624b\u52a8\u5b89\u88c5 Git \u63d2\u4ef6\u3002<\/p>\n<p>\u5982\u679c\u4f60\u4f7f\u7528 IntelliJ IDEA \u8fdb\u884c\u5f00\u53d1\uff0c\u53ea\u9700\u8981\u5728\u6253\u5f00\u7684\u9879\u76ee\u4e2d\u68c0\u67e5\u662f\u5426\u542f\u7528\u4e86\u7248\u672c\u63a7\u5236\u3002\u5982\u679c Git \u662f\u5df2\u7ecf\u542f\u7528\u7684\u7248\u672c\u63a7\u5236\u5668\uff0c\u90a3\u4e48\u5728\u9879\u76ee\u4e2d\u5c06\u4f1a\u51fa\u73b0 Git \u76f8\u5173\u7684\u914d\u7f6e\u548c\u547d\u4ee4\u3002<\/p>\n<p>\u65b9\u6cd5\u56db\uff1a\u5728\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u67e5\u770bGit<\/p>\n<p>\u5728\u67d0\u4e9b\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u4f8b\u5982 Linux \u6216 macOS\uff0c\u4f60\u8fd8\u53ef\u4ee5\u4f7f\u7528\u64cd\u4f5c\u7cfb\u7edf\u7684\u547d\u4ee4\u884c\u754c\u9762\u6765\u786e\u5b9a Git \u662f\u5426\u5df2\u5b89\u88c5\u3002<\/p>\n<p>\u5bf9\u4e8e Linux \u7528\u6237\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5 Git \u7684\u5b89\u88c5\u72b6\u6001\uff1a<\/p>\n<p>sudo yum install git-all # Yum \u5305\u7ba1\u7406\u5668 (CentOS, Fedora \u7b49)<br \/>sudo apt install git-all # APT \u5305\u7ba1\u7406\u5668 (Debian, Ubuntu \u7b49)<br \/>sudo pacman -S git # Pacman \u5305\u7ba1\u7406\u5668 (Arch Linux)<\/p>\n<p>\u5982\u679c Git \u5df2\u5b89\u88c5\u6210\u529f\uff0c\u4f60\u5c06\u4f1a\u8f93\u51fa Git \u7684\u7248\u672c\u53f7\u3002<\/p>\n<p>\u5bf9\u4e8e macOS \u7528\u6237\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5 Git \u7684\u5b89\u88c5\u72b6\u6001\uff1a<\/p>\n<p>which git<\/p>\n<p>\u8fd9\u5c06\u4f1a\u8f93\u51fa Git \u5de5\u5177\u7684\u5b89\u88c5\u4f4d\u7f6e\u3002\u5bf9\u4e8e macOS\uff0c\u9700\u8981\u5b89\u88c5 Xcode \u5f00\u53d1\u5de5\u5177\u4ee5\u83b7\u5f97\u547d\u4ee4\u884c\u5de5\u5177\u529f\u80fd\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5 Xcode\uff0c\u4f60\u9700\u8981\u5728 macOS App Store \u4e0b\u8f7d Xcode \u5e76\u5b89\u88c5\u3002<\/p>\n<p>\u7ed3\u8bba<\/p>\n<p>\u5728\u73b0\u4ee3\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0c\u638c\u63e1 Git \u7684\u57fa\u7840\u77e5\u8bc6\u662f\u5fc5\u8981\u7684\uff0c\u8fd9\u5c31\u5305\u62ec\u5728\u81ea\u5df1\u7535\u8111\u4e0a\u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86 Git \u7684\u77e5\u8bc6\u3002\u672c\u6587\u63d0\u4f9b\u4e86\u51e0\u79cd\u68c0\u67e5 Git \u5b89\u88c5\u72b6\u6001\u7684\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528\u7ec8\u7aef\u3001Git Bash \u7ec8\u7aef\u4eff\u771f\u5668\u3001IDE \u5de5\u5177\u548c\u64cd\u4f5c\u7cfb\u7edf\u81ea\u5e26\u7684\u547d\u4ee4\u884c\u754c\u9762\u3002\u65e0\u8bba\u4f60\u4f7f\u7528\u54ea\u79cd\u65b9\u6cd5\uff0c\u4e86\u89e3\u81ea\u5df1\u7535\u8111\u4e0a Git \u7684\u5b89\u88c5\u72b6\u6001\u5c06\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u8fdb\u884c\u8f6f\u4ef6\u5f00\u53d1\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u68c0\u67e5\u81ea\u5df1\u7535\u8111\u4e0a\u6709git\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\u73b0\u4ee3\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0cgit \u5df2\u6210\u4e3a\u4e3b\u6d41\u7248\u672c\u63a7\u5236\u5de5\u5177\u3002\u5bf9\u4e8e\u5f00\u53d1\u4eba\u5458\u6765\u8bf4\uff0c\u638c\u63e1 git \u7684\u57fa\u7840\u77e5\u8bc6\u662f\u5fc5\u8981\u7684\u3002\u7136\u800c\uff0c\u6709\u65f6\u5019\uff0c\u6211\u4eec\u9700\u8981\u5728\u81ea\u5df1\u7684\u7535\u8111\u4e0a\u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86 git\u3002\u90a3\u4e48\uff0c\u8be5\u5982\u4f55\u68c0\u67e5\u81ea\u5df1\u7535\u8111\u4e0a\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86 git \u5462\uff1f \u4ee5\u4e0b\u662f\u51e0\u79cd\u68c0\u67e5 Git \u5b89\u88c5\u72b6\u6001\u7684\u65b9\u6cd5\uff1a \u65b9\u6cd5\u4e00\uff1a\u6253\u5f00\u7ec8\u7aef \u9996\u5148\uff0c\u6253\u5f00\u7ec8\u7aef\uff0c\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a git &#8211;version \u5982\u679c\u4f60\u770b\u5230\u8f93\u51fa\u7684\u7248\u672c\u53f7\uff0c\u90a3\u4e48\u8bf4\u660e Git \u5df2\u6210\u529f\u5b89\u88c5\u5728\u4f60\u7684\u7535\u8111\u4e0a\u3002 \u4f8b\u5982\uff1a git version 2.24.3 (Apple Git-128) \u4ee5\u4e0a\u547d\u4ee4\u4f1a\u8f93\u51fa\u5f53\u524d Git \u7684\u7248\u672c\u4fe1\u606f\u3002\u5982\u679c\u6ca1\u6709\u8fd9\u6837\u7684\u8f93\u51fa\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u5b89\u88c5 Git\u3002 \u65b9\u6cd5\u4e8c\uff1a\u5728 Git Bash \u4e2d\u68c0\u67e5 Git Bash \u662f\u4e00\u4e2a\u4e3a Windows \u8bbe\u8ba1\u7684\u7ec8\u7aef\u4eff\u771f\u5668\uff0c\u5b83\u652f\u6301\u4f7f\u7528 Git \u547d\u4ee4\u884c\u5de5\u5177\u3002\u5982\u679c\u4f60\u5728 Windows \u5e73\u53f0\u4e0a\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528 Git Bash \u6765\u68c0\u67e5 Git \u662f\u5426\u5df2\u5b89\u88c5\u3002 \u9996\u5148\uff0c\u6253\u5f00 Git Bash \u7ec8\u7aef\uff0c\u5e76\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a git &#8211;version \u5982\u679c Git \u4ee5\u6b63\u786e\u7684\u65b9\u5f0f\u5b89\u88c5\uff0c\u90a3\u4e48 Git [&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-20260","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20260","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=20260"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20260\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}