{"id":19332,"date":"2024-11-19T16:35:45","date_gmt":"2024-11-19T08:35:45","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19332\/"},"modified":"2024-11-19T16:35:45","modified_gmt":"2024-11-19T08:35:45","slug":"mac%e4%b8%8a%e6%80%8e%e4%b9%88%e5%ae%89%e8%a3%85git%ef%bc%88%e6%ad%a5%e9%aa%a4%ef%bc%89","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19332\/","title":{"rendered":"mac\u4e0a\u600e\u4e48\u5b89\u88c5git\uff08\u6b65\u9aa4\uff09"},"content":{"rendered":"<p>\u5728 mac \u7cfb\u7edf\u4e0a\uff0c\u9700\u8981\u5b89\u88c5 git \u624d\u80fd\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528 git \u547d\u4ee4\u3002\u4ee5\u4e0b\u662f\u5728 mac \u4e0a\u5b89\u88c5 git \u7684\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u6253\u5f00 \u7ec8\u7aef \u5e94\u7528\u7a0b\u5e8f\uff08\u5728 Launchpad \u4e2d\u641c\u7d22\u201c\u7ec8\u7aef\u201d\uff09\u3002<\/li>\n<li>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5 Homebrew\uff1a<\/li>\n<\/ol>\n<pre>\/usr\/bin\/ruby -e \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)\"<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u5b89\u88c5 Git\uff1a<\/li>\n<\/ol>\n<pre>brew install git<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u786e\u8ba4 Git \u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a<\/li>\n<\/ol>\n<pre>git --version<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c Git \u5b89\u88c5\u6210\u529f\uff0c\u4f1a\u663e\u793a Git \u7684\u7248\u672c\u4fe1\u606f\u3002<\/p>\n<ol>\n<li>\u53ef\u4ee5\u914d\u7f6e Git \u7684\u5168\u5c40\u8bbe\u7f6e\uff08\u53ef\u9009\uff09\uff1a<\/li>\n<\/ol>\n<pre>git config --global user.name \"Your Name\"\ngit config --global user.email \"youremail@example.com\"<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8fd9\u6837\uff0c\u5728\u4f7f\u7528 Git \u65f6\uff0c\u6bcf\u6b21\u63d0\u4ea4\u4ee3\u7801\u7684\u4f5c\u8005\u548c\u90ae\u7bb1\u90fd\u4f1a\u81ea\u52a8\u586b\u5165\u5168\u5c40\u8bbe\u7f6e\u4e2d\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5c31\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528 Git \u547d\u4ee4\u4e86\u3002<\/p>\n<p>\u5728 Mac \u4e0a\u4f7f\u7528 Git \u65f6\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u56fe\u5f62\u5316\u7684\u5de5\u5177\u6765\u7ba1\u7406\u4ee3\u7801\uff0c\u4f8b\u5982 SourceTree\u3001GitHub Desktop \u7b49\u3002\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u63d0\u4f9b\u66f4\u76f4\u89c2\u7684\u7528\u6237\u754c\u9762\uff0c\u4f7f\u5f97\u5728 Mac \u4e0a\u7ba1\u7406\u4ee3\u7801\u66f4\u52a0\u65b9\u4fbf\u3002<\/p>\n<p>\u603b\u4e4b\uff0c\u5728 Mac \u4e0a\u5b89\u88c5 Git \u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u4f7f\u7528\u547d\u4ee4\u884c\u5b89\u88c5 Homebrew \u548c Git \u7136\u540e\u5c31\u53ef\u4ee5\u6109\u5feb\u7684\u7f16\u5199\u4ee3\u7801\u4e86\uff01<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fmac\u4e0a\u600e\u4e48\u5b89\u88c5git\uff08\u6b65\u9aa4\uff09\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 mac \u7cfb\u7edf\u4e0a\uff0c\u9700\u8981\u5b89\u88c5 git \u624d\u80fd\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528 git \u547d\u4ee4\u3002\u4ee5\u4e0b\u662f\u5728 mac \u4e0a\u5b89\u88c5 git \u7684\u6b65\u9aa4\uff1a \u6253\u5f00 \u7ec8\u7aef \u5e94\u7528\u7a0b\u5e8f\uff08\u5728 Launchpad \u4e2d\u641c\u7d22\u201c\u7ec8\u7aef\u201d\uff09\u3002 \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5 Homebrew\uff1a \/usr\/bin\/ruby -e &#8220;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)&#8221; \u767b\u5f55\u540e\u590d\u5236 \u5b89\u88c5 Git\uff1a brew install git \u767b\u5f55\u540e\u590d\u5236 \u786e\u8ba4 Git \u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a git &#8211;version \u767b\u5f55\u540e\u590d\u5236 \u5982\u679c Git \u5b89\u88c5\u6210\u529f\uff0c\u4f1a\u663e\u793a Git \u7684\u7248\u672c\u4fe1\u606f\u3002 \u53ef\u4ee5\u914d\u7f6e Git \u7684\u5168\u5c40\u8bbe\u7f6e\uff08\u53ef\u9009\uff09\uff1a git config &#8211;global user.name &#8220;Your Name&#8221; git config &#8211;global user.email &#8220;youremail@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-19332","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19332","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=19332"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19332\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}