{"id":19247,"date":"2024-11-19T14:41:09","date_gmt":"2024-11-19T06:41:09","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19247\/"},"modified":"2024-11-19T14:41:09","modified_gmt":"2024-11-19T06:41:09","slug":"centos-7-git-%e5%ae%89%e8%a3%85%e6%ad%a5%e9%aa%a4%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19247\/","title":{"rendered":"CentOS 7 Git \u5b89\u88c5\u6b65\u9aa4\u6559\u7a0b"},"content":{"rendered":"<p>git \u662f\u4e00\u79cd\u975e\u5e38\u53d7\u6b22\u8fce\u7684\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u5b83\u53ef\u4ee5\u6709\u6548\u5730\u7ba1\u7406\u4ee3\u7801\u7684\u4fee\u6539\u548c\u5408\u5e76\u3002\u4ee5\u4e0b\u662f centos 7 \u4e0a git \u7684\u5b89\u88c5\u6b65\u9aa4\u3002<\/p>\n<ol>\n<li>\u66f4\u65b0\u7cfb\u7edf<\/li>\n<\/ol>\n<p>\u5728\u5b89\u88c5 Git \u4e4b\u524d\uff0c\u5efa\u8bae\u5148\u66f4\u65b0\u4f60\u7684 CentOS 7 \u7cfb\u7edf\uff1a<\/p>\n<pre>sudo yum update<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8f93\u5165\u5bc6\u7801\u540e\uff0c\u7cfb\u7edf\u4f1a\u5f00\u59cb\u66f4\u65b0\u66f4\u65b0\u8f6f\u4ef6\u5305\u3002\u66f4\u65b0\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u7ee7\u7eed\u4e0b\u4e00\u6b65\u3002<\/p>\n<ol>\n<li>\u5b89\u88c5 Git<\/li>\n<\/ol>\n<p>CentOS 7 \u4e0a\u7684 Git \u5305\u53ef\u4ee5\u901a\u8fc7\u9ed8\u8ba4\u7684\u8f6f\u4ef6\u6e90\u8fdb\u884c\u5b89\u88c5\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<pre>sudo yum install git<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u7136\u540e\uff0c\u7cfb\u7edf\u4f1a\u63d0\u793a\u4f60\u662f\u5426\u786e\u8ba4\u5b89\u88c5\u3002\u8f93\u5165 &#8220;y&#8221; \u5e76\u56de\u8f66\u5373\u53ef\u5f00\u59cb\u5b89\u88c5\u3002\u7cfb\u7edf\u5c06\u4f1a\u81ea\u52a8\u5b89\u88c5\u4f9d\u8d56\u9879\u5e76\u5b8c\u6210 Git \u7684\u5b89\u88c5\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u68c0\u67e5\u5b89\u88c5\u7684\u7248\u672c\uff1a<\/p>\n<pre>git --version<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c\u4f60\u80fd\u770b\u5230\u7c7b\u4f3c\u4ee5\u4e0b\u7684\u8f93\u51fa\uff0c\u8bf4\u660e Git \u5b89\u88c5\u6210\u529f\u4e86\uff1a<\/p>\n<pre>git version 2.22.0<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u914d\u7f6e Git<\/li>\n<\/ol>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u9700\u8981\u914d\u7f6e Git\u3002\u914d\u7f6e\u5305\u62ec\u8bbe\u7f6e\u7528\u6237\u540d\u548c\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u3002\u6b64\u4fe1\u606f\u5c06\u4e0e\u4f60\u7684 Git \u4ed3\u5e93\u4e2d\u7684\u6240\u6709\u63d0\u4ea4\u76f8\u5173\u8054\u3002<\/p>\n<p>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u8bbe\u7f6e\u7528\u6237\u540d\u548c\u7535\u5b50\u90ae\u4ef6\u5730\u5740\uff1a<\/p>\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>\u8bf7\u5c06 &#8220;Your Name&#8221; \u548c &#8220;youremail@example.com&#8221; \u66ff\u6362\u4e3a\u4f60\u81ea\u5df1\u7684\u7528\u6237\u540d\u548c\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u3002<\/p>\n<p>4.\u68c0\u67e5 Git \u914d\u7f6e<\/p>\n<p>\u4e3a\u4e86\u786e\u4fdd\u914d\u7f6e\u6b63\u786e\uff0c\u4f60\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b Git \u914d\u7f6e\uff1a<\/p>\n<pre>git config --list<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c\u4f60\u770b\u5230\u4ee5\u4e0b\u8f93\u51fa\uff0c\u5c31\u8868\u793a\u914d\u7f6e\u6b63\u786e\uff1a<\/p>\n<pre>user.name=Your Name\nuser.email=youremail@example.com<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u81f3\u6b64\uff0cCentOS7 \u4e0a Git \u7684\u5b89\u88c5\u5df2\u7ecf\u5b8c\u6210\u4e86\u3002 \u5f00\u59cb\u4eab\u53d7 Git \u7ba1\u7406\u4ee3\u7801\u7684\u4fbf\u6377\u5427\uff01<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fCentOS 7 Git \u5b89\u88c5\u6b65\u9aa4\u6559\u7a0b\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>git \u662f\u4e00\u79cd\u975e\u5e38\u53d7\u6b22\u8fce\u7684\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u5b83\u53ef\u4ee5\u6709\u6548\u5730\u7ba1\u7406\u4ee3\u7801\u7684\u4fee\u6539\u548c\u5408\u5e76\u3002\u4ee5\u4e0b\u662f centos 7 \u4e0a git \u7684\u5b89\u88c5\u6b65\u9aa4\u3002 \u66f4\u65b0\u7cfb\u7edf \u5728\u5b89\u88c5 Git \u4e4b\u524d\uff0c\u5efa\u8bae\u5148\u66f4\u65b0\u4f60\u7684 CentOS 7 \u7cfb\u7edf\uff1a sudo yum update \u767b\u5f55\u540e\u590d\u5236 \u8f93\u5165\u5bc6\u7801\u540e\uff0c\u7cfb\u7edf\u4f1a\u5f00\u59cb\u66f4\u65b0\u66f4\u65b0\u8f6f\u4ef6\u5305\u3002\u66f4\u65b0\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u7ee7\u7eed\u4e0b\u4e00\u6b65\u3002 \u5b89\u88c5 Git CentOS 7 \u4e0a\u7684 Git \u5305\u53ef\u4ee5\u901a\u8fc7\u9ed8\u8ba4\u7684\u8f6f\u4ef6\u6e90\u8fdb\u884c\u5b89\u88c5\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a sudo yum install git \u767b\u5f55\u540e\u590d\u5236 \u7136\u540e\uff0c\u7cfb\u7edf\u4f1a\u63d0\u793a\u4f60\u662f\u5426\u786e\u8ba4\u5b89\u88c5\u3002\u8f93\u5165 &#8220;y&#8221; \u5e76\u56de\u8f66\u5373\u53ef\u5f00\u59cb\u5b89\u88c5\u3002\u7cfb\u7edf\u5c06\u4f1a\u81ea\u52a8\u5b89\u88c5\u4f9d\u8d56\u9879\u5e76\u5b8c\u6210 Git \u7684\u5b89\u88c5\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u68c0\u67e5\u5b89\u88c5\u7684\u7248\u672c\uff1a git &#8211;version \u767b\u5f55\u540e\u590d\u5236 \u5982\u679c\u4f60\u80fd\u770b\u5230\u7c7b\u4f3c\u4ee5\u4e0b\u7684\u8f93\u51fa\uff0c\u8bf4\u660e Git \u5b89\u88c5\u6210\u529f\u4e86\uff1a git version 2.22.0 \u767b\u5f55\u540e\u590d\u5236 \u914d\u7f6e Git \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u9700\u8981\u914d\u7f6e Git\u3002\u914d\u7f6e\u5305\u62ec\u8bbe\u7f6e\u7528\u6237\u540d\u548c\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u3002\u6b64\u4fe1\u606f\u5c06\u4e0e\u4f60\u7684 Git \u4ed3\u5e93\u4e2d\u7684\u6240\u6709\u63d0\u4ea4\u76f8\u5173\u8054\u3002 \u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u8bbe\u7f6e\u7528\u6237\u540d\u548c\u7535\u5b50\u90ae\u4ef6\u5730\u5740\uff1a git config [&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-19247","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19247","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=19247"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19247\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}