{"id":21214,"date":"2024-11-19T11:00:46","date_gmt":"2024-11-19T03:00:46","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21214\/"},"modified":"2024-11-19T11:00:46","modified_gmt":"2024-11-19T03:00:46","slug":"git%e6%8f%90%e4%ba%a4%e6%96%87%e4%bb%b6%e5%91%bd%e4%bb%a4%e5%9c%a8%e5%93%aa","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21214\/","title":{"rendered":"git\u63d0\u4ea4\u6587\u4ef6\u547d\u4ee4\u5728\u54ea"},"content":{"rendered":"<blockquote><p>\n  git \u4e2d\u63d0\u4ea4\u6587\u4ef6\u547d\u4ee4\u4e3a git commit\uff0c\u7528\u9014\u662f\u5c06\u6682\u5b58\u7a7a\u95f4\u7684\u66f4\u6539\u8bb0\u5f55\u5230\u7248\u672c\u5386\u53f2\u3002\u5b83\u63a5\u53d7 -m \u9009\u9879\u6307\u5b9a\u4e00\u4e2a\u7b80\u77ed\u7684\u63d0\u4ea4\u4fe1\u606f\uff0c\u4f8b\u5982\u66f4\u65b0\u4e86 readme.md\u3002\u5176\u4ed6\u9009\u9879\u5305\u62ec -a\uff08\u63d0\u4ea4\u6240\u6709\u5df2\u4fee\u6539\u6587\u4ef6\uff09\u3001&#8211;amend\uff08\u4fee\u6539\u6700\u8fd1\u4e00\u6b21\u63d0\u4ea4\uff09\u548c &#8211;signoff\uff08\u6dfb\u52a0\u4f5c\u8005\u7b7e\u7f72\uff09\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/09\/2024040912301819023.jpg\" class=\"aligncenter\" title=\"git\u63d0\u4ea4\u6587\u4ef6\u547d\u4ee4\u5728\u54ea\u63d2\u56fe\" alt=\"git\u63d0\u4ea4\u6587\u4ef6\u547d\u4ee4\u5728\u54ea\u63d2\u56fe\" \/><\/p>\n<p><strong>Git \u63d0\u4ea4\u6587\u4ef6\u547d\u4ee4<\/strong><\/p>\n<p>\u5728 Git \u4e2d\uff0c\u63d0\u4ea4\u6587\u4ef6\u547d\u4ee4\u662f  commit\uff0c\u5b83\u7528\u4e8e\u5c06\u6682\u5b58\u7a7a\u95f4\u4e2d\u7684\u66f4\u6539\u8bb0\u5f55\u5230\u7248\u672c\u5386\u53f2\u4e2d\u3002<\/p>\n<p><strong>\u4f7f\u7528\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>\u5728 Git \u547d\u4ee4\u884c\u4e2d\uff0c\u5bfc\u822a\u5230\u8981\u63d0\u4ea4\u6587\u4ef6\u7684\u76ee\u5f55\uff0c\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>git commit -m \"&lt;\u63d0\u4ea4\u4fe1\u606f&gt;\"<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2d\uff0c \u4e3a\u5bf9\u6240\u505a\u66f4\u6539\u7684\u7b80\u8981\u63cf\u8ff0\u3002<\/p>\n<p><strong>\u8be6\u7ec6\u8bf4\u660e\uff1a<\/strong><\/p>\n<p>git commit \u547d\u4ee4\u5177\u6709\u4ee5\u4e0b\u4e3b\u8981\u529f\u80fd\uff1a<\/p>\n<ul>\n<li>\u5c06\u6682\u5b58\u7a7a\u95f4\u4e2d\u7684\u6587\u4ef6\u590d\u5236\u5230\u6682\u5b58\u7d22\u5f15\u4e2d\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u63d0\u4ea4\u5bf9\u8c61\uff0c\u5176\u4e2d\u5305\u542b\u6682\u5b58\u7d22\u5f15\u7684\u5185\u5bb9\u3001\u4f5c\u8005\u4fe1\u606f\u3001\u63d0\u4ea4\u4fe1\u606f\u548c\u7236\u63d0\u4ea4\u3002<\/li>\n<li>\u5c06\u65b0\u5efa\u7684\u63d0\u4ea4\u5bf9\u8c61\u6dfb\u52a0\u5230\u7248\u672c\u5386\u53f2\u7684\u94fe\u4e2d\u3002<\/li>\n<\/ul>\n<p>-m \u9009\u9879\u5141\u8bb8\u6307\u5b9a\u63d0\u4ea4\u4fe1\u606f\uff0c\u8fd9\u662f\u63d0\u4ea4\u5bf9\u8c61\u7684\u5173\u952e\u7ec4\u6210\u90e8\u5206\u3002\u63d0\u4ea4\u4fe1\u606f\u5e94\u7b80\u660e\u627c\u8981\uff0c\u63cf\u8ff0\u6240\u505a\u7684\u66f4\u6539\u3002<\/p>\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n<p>\u63d0\u4ea4 README.md \u6587\u4ef6\u7684\u66f4\u6539\uff1a<\/p>\n<pre>git add README.md\ngit commit -m \"\u66f4\u65b0\u4e86 README.md\"<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u5176\u4ed6\u9009\u9879\uff1a<\/strong><\/p>\n<p>git commit \u547d\u4ee4\u8fd8\u6709\u5176\u4ed6\u9009\u9879\uff0c\u7528\u4e8e\u81ea\u5b9a\u4e49\u63d0\u4ea4\u884c\u4e3a\uff1a<\/p>\n<ul>\n<li>-a\uff1a\u63d0\u4ea4\u6240\u6709\u4fee\u6539\u8fc7\u7684\u6587\u4ef6\uff0c\u65e0\u9700\u624b\u52a8\u6682\u5b58\u3002<\/li>\n<li>&#8211;amend\uff1a\u4fee\u6539\u6700\u8fd1\u4e00\u6b21\u63d0\u4ea4\u7684\u4fe1\u606f\u6216\u5185\u5bb9\u3002<\/li>\n<li>&#8211;signoff\uff1a\u5728\u63d0\u4ea4\u4fe1\u606f\u4e2d\u6dfb\u52a0\u7b7e\u7f72\uff0c\u8868\u793a\u4f5c\u8005\u5bf9\u66f4\u6539\u7684\u786e\u8ba4\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u63d0\u4ea4\u6587\u4ef6\u547d\u4ee4\u5728\u54ea\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 \u4e2d\u63d0\u4ea4\u6587\u4ef6\u547d\u4ee4\u4e3a git commit\uff0c\u7528\u9014\u662f\u5c06\u6682\u5b58\u7a7a\u95f4\u7684\u66f4\u6539\u8bb0\u5f55\u5230\u7248\u672c\u5386\u53f2\u3002\u5b83\u63a5\u53d7 -m \u9009\u9879\u6307\u5b9a\u4e00\u4e2a\u7b80\u77ed\u7684\u63d0\u4ea4\u4fe1\u606f\uff0c\u4f8b\u5982\u66f4\u65b0\u4e86 readme.md\u3002\u5176\u4ed6\u9009\u9879\u5305\u62ec -a\uff08\u63d0\u4ea4\u6240\u6709\u5df2\u4fee\u6539\u6587\u4ef6\uff09\u3001&#8211;amend\uff08\u4fee\u6539\u6700\u8fd1\u4e00\u6b21\u63d0\u4ea4\uff09\u548c &#8211;signoff\uff08\u6dfb\u52a0\u4f5c\u8005\u7b7e\u7f72\uff09\u3002 Git \u63d0\u4ea4\u6587\u4ef6\u547d\u4ee4 \u5728 Git \u4e2d\uff0c\u63d0\u4ea4\u6587\u4ef6\u547d\u4ee4\u662f commit\uff0c\u5b83\u7528\u4e8e\u5c06\u6682\u5b58\u7a7a\u95f4\u4e2d\u7684\u66f4\u6539\u8bb0\u5f55\u5230\u7248\u672c\u5386\u53f2\u4e2d\u3002 \u4f7f\u7528\u65b9\u6cd5\uff1a \u5728 Git \u547d\u4ee4\u884c\u4e2d\uff0c\u5bfc\u822a\u5230\u8981\u63d0\u4ea4\u6587\u4ef6\u7684\u76ee\u5f55\uff0c\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a git commit -m &#8220;&lt;\u63d0\u4ea4\u4fe1\u606f&gt;&#8221; \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff0c \u4e3a\u5bf9\u6240\u505a\u66f4\u6539\u7684\u7b80\u8981\u63cf\u8ff0\u3002 \u8be6\u7ec6\u8bf4\u660e\uff1a git commit \u547d\u4ee4\u5177\u6709\u4ee5\u4e0b\u4e3b\u8981\u529f\u80fd\uff1a \u5c06\u6682\u5b58\u7a7a\u95f4\u4e2d\u7684\u6587\u4ef6\u590d\u5236\u5230\u6682\u5b58\u7d22\u5f15\u4e2d\u3002 \u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u63d0\u4ea4\u5bf9\u8c61\uff0c\u5176\u4e2d\u5305\u542b\u6682\u5b58\u7d22\u5f15\u7684\u5185\u5bb9\u3001\u4f5c\u8005\u4fe1\u606f\u3001\u63d0\u4ea4\u4fe1\u606f\u548c\u7236\u63d0\u4ea4\u3002 \u5c06\u65b0\u5efa\u7684\u63d0\u4ea4\u5bf9\u8c61\u6dfb\u52a0\u5230\u7248\u672c\u5386\u53f2\u7684\u94fe\u4e2d\u3002 -m \u9009\u9879\u5141\u8bb8\u6307\u5b9a\u63d0\u4ea4\u4fe1\u606f\uff0c\u8fd9\u662f\u63d0\u4ea4\u5bf9\u8c61\u7684\u5173\u952e\u7ec4\u6210\u90e8\u5206\u3002\u63d0\u4ea4\u4fe1\u606f\u5e94\u7b80\u660e\u627c\u8981\uff0c\u63cf\u8ff0\u6240\u505a\u7684\u66f4\u6539\u3002 \u793a\u4f8b\uff1a \u63d0\u4ea4 README.md \u6587\u4ef6\u7684\u66f4\u6539\uff1a git add README.md git commit -m &#8220;\u66f4\u65b0\u4e86 README.md&#8221; \u767b\u5f55\u540e\u590d\u5236 \u5176\u4ed6\u9009\u9879\uff1a git commit \u547d\u4ee4\u8fd8\u6709\u5176\u4ed6\u9009\u9879\uff0c\u7528\u4e8e\u81ea\u5b9a\u4e49\u63d0\u4ea4\u884c\u4e3a\uff1a -a\uff1a\u63d0\u4ea4\u6240\u6709\u4fee\u6539\u8fc7\u7684\u6587\u4ef6\uff0c\u65e0\u9700\u624b\u52a8\u6682\u5b58\u3002 &#8211;amend\uff1a\u4fee\u6539\u6700\u8fd1\u4e00\u6b21\u63d0\u4ea4\u7684\u4fe1\u606f\u6216\u5185\u5bb9\u3002 &#8211;signoff\uff1a\u5728\u63d0\u4ea4\u4fe1\u606f\u4e2d\u6dfb\u52a0\u7b7e\u7f72\uff0c\u8868\u793a\u4f5c\u8005\u5bf9\u66f4\u6539\u7684\u786e\u8ba4\u3002 [&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-21214","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21214","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=21214"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21214\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}