{"id":1058,"date":"2022-04-20T16:47:19","date_gmt":"2022-04-20T08:47:19","guid":{"rendered":"http:\/\/zhuxinyong.com\/?p=1058"},"modified":"2022-04-20T17:29:04","modified_gmt":"2022-04-20T09:29:04","slug":"git-cha-kan-wen-jian-zhong-mou-xing-ji-lu","status":"publish","type":"post","link":"https:\/\/zhuxinyong.com\/?p=1058","title":{"rendered":"Git \u67e5\u770b\u6587\u4ef6\u4e2d\u67d0\u884c\u8bb0\u5f55"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/zhuxinyong.com\/wp-content\/uploads\/2022\/04\/\u9ed8\u8ba4\u6807\u9898_\u516c\u4f17\u53f7\u5c01\u9762\u9996\u56fe_2022-04-2017_28_23.jpeg\" alt=\"\u9ed8\u8ba4\u6807\u9898_\u516c\u4f17\u53f7\u5c01\u9762\u9996\u56fe_2022-04-20+17_28_23\" \/><\/p>\n<p>\u4eca\u5929\u6709\u4e2a\u540c\u4e8b\u95ee\u6211\uff1a\u600e\u4e48\u770b\u67d0\u884c\u4ee3\u7801\u662f\u8c01\u5199\u7684\u5462\uff1f<\/p>\n<p>\u6211\u4ee5\u4e3a\u4ed6\u662f\u8981\u627e\u4ed6\u7b97\u8d26\u5462\uff0c\u6bd5\u7adf\u627e\u8bb0\u5f55\u4e00\u822c\u90fd\u662f\u51fa\u95ee\u9898\u7684\u65f6\u5019\u770b\u770b\u5230\u5e95\u662f\u8c01\u5f15\u5165\u4e86\u4ee5\u53ca\u600e\u4e48\u5f15\u5165\u7684\u3002\u4ed6\u7684\u76ee\u7684\u662f\uff1a\u56e0\u4e3a\u4ee3\u7801\u592a\u591a\u770b\u4e0d\u61c2\u903b\u8f91\uff0c\u60f3\u95ee\u95ee\u5199\u7684\u90a3\u4e2a\u4eba\u7684\u601d\u8def\u3002<\/p>\n<p>\u4e0d\u5931\u4e3a\u4e00\u4e2a\u597d\u7684\u60f3\u6cd5\uff0c\u90a3\u6211\u4eec\u5982\u4f55\u5b9e\u73b0\u5462\uff1fgit \u6709\u4e2a\u547d\u4ee4\uff1a<a href=\"https:\/\/git-scm.com\/docs\/git-blame\" target=\"_blank\" rel=\"noopener\"><strong>blame<\/strong><\/a>\u3002<\/p>\n<blockquote>\n<p>git-blame &#8211; Show what revision and author last modified each line of a file<\/p>\n<\/blockquote>\n<p>blame \u7684\u4e2d\u6587\u5c31\u662f\uff1a<strong>\u8d23\u602a<\/strong>\uff0c\u53ef\u4ee5\u770b\u51fa\u6b64\u547d\u4ee4\u7684\u7528\u5904\u4e86\u5427\u3002<\/p>\n<pre><code class=\"language-plain_text\">git blame [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental]\n\t    [-L &lt;range&gt;] [-S &lt;revs-file&gt;] [-M] [-C] [-C] [-C] [--since=&lt;date&gt;]\n\t    [--ignore-rev &lt;rev&gt;] [--ignore-revs-file &lt;file&gt;]\n\t    [--color-lines] [--color-by-age] [--progress] [--abbrev=&lt;n&gt;]\n\t    [&lt;rev&gt; | --contents &lt;file&gt; | --reverse &lt;rev&gt;..&lt;rev&gt;] [--] &lt;file&gt;\n<\/code><\/pre>\n<p>\u4f7f\u7528\uff1a<\/p>\n<ol>\n<li>\u547d\u4ee4\u6a21\u5f0f<\/li>\n<\/ol>\n<pre><code class=\"language-plain_text\">git blame .\/path\/to\/your\/file\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/zhuxinyong.com\/wp-content\/uploads\/2022\/04\/16504455470476.jpg\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/zhuxinyong.com\/wp-content\/uploads\/2022\/04\/16504457077618.jpg\" alt=\"\" \/><\/p>\n<p>\u4e00\u76ee\u4e86\u7136\uff0c\u975e\u5e38\u6e05\u695a\u3002<\/p>\n<ol start=\"2\">\n<li>\u63d2\u4ef6\uff1a\u53ef\u80fd\u4f60\u4e0d\u592a\u559c\u6b22\u7528\u547d\u4ee4\u884c\uff0cvscode \u91cc\u5b89\u88c5 <strong>Gitlens<\/strong> \u63d2\u4ef6\u3002<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"http:\/\/zhuxinyong.com\/wp-content\/uploads\/2022\/04\/16504458909744.jpg\" alt=\"\" \/><\/p>\n<p>\u5149\u6807\u5728\u54ea\u884c\u540e\u9762\u5c31\u4f1a\u6709\u8bb0\u5f55\uff0c\u9f20\u6807\u653e\u5230\u4e0a\u9762\u8fd8\u6709\u8be6\u7ec6\u4fe1\u606f\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/zhuxinyong.com\/wp-content\/uploads\/2022\/04\/16504459619799.jpg\" alt=\"\" \/><\/p>\n<p>\u5b98\u65b9\u7684\u56fe:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/zhuxinyong.com\/wp-content\/uploads\/2022\/04\/16504460371808.jpg\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u6709\u4e2a\u540c\u4e8b\u95ee\u6211\uff1a\u600e\u4e48\u770b\u67d0\u884c\u4ee3\u7801\u662f\u8c01\u5199\u7684\u5462\uff1f \u6211\u4ee5\u4e3a\u4ed6\u662f\u8981\u627e\u4ed6\u7b97\u8d26\u5462\uff0c\u6bd5\u7adf\u627e\u8bb0\u5f55\u4e00\u822c\u90fd\u662f\u51fa\u95ee\u9898\u7684\u65f6\u5019&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,20,3],"tags":[99,28],"class_list":["post-1058","post","type-post","status-publish","format-standard","hentry","category-all","category-frontend","category-tech","tag-blame","tag-git"],"_links":{"self":[{"href":"https:\/\/zhuxinyong.com\/index.php?rest_route=\/wp\/v2\/posts\/1058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zhuxinyong.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhuxinyong.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhuxinyong.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zhuxinyong.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1058"}],"version-history":[{"count":1,"href":"https:\/\/zhuxinyong.com\/index.php?rest_route=\/wp\/v2\/posts\/1058\/revisions"}],"predecessor-version":[{"id":1059,"href":"https:\/\/zhuxinyong.com\/index.php?rest_route=\/wp\/v2\/posts\/1058\/revisions\/1059"}],"wp:attachment":[{"href":"https:\/\/zhuxinyong.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhuxinyong.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhuxinyong.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}