{"id":59,"date":"2019-05-13T14:12:24","date_gmt":"2019-05-13T06:12:24","guid":{"rendered":"https:\/\/thereisno.top:4430\/?p=59"},"modified":"2019-05-13T21:32:04","modified_gmt":"2019-05-13T13:32:04","slug":"git-%e4%bb%a3%e7%a0%81%e9%87%8f%e7%bb%9f%e8%ae%a1","status":"publish","type":"post","link":"https:\/\/thereisno.top\/?p=59","title":{"rendered":"git \u4ee3\u7801\u91cf\u7edf\u8ba1"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u589e\u52a0\u7684\u4ee3\u7801\u884c\u6570\u91cf<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> git log &#8211;stat|perl -ne &#8216;END { print $c } $c += $1 if \/(\\d+) insertions\/&#8217; <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7cbe\u786e\u7684\u4ee3\u7801\u884c\u4fee\u6539\u6570\u91cf\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> git log &#8211;author=&#8221;$(git config &#8211;get user.name)&#8221; &#8211;pretty=tformat: &#8211;numstat | gawk &#8216;{ add += $1 ; subs += $2 ; loc += $1 + $2 } END { printf &#8220;added lines: %s removed lines : %s total lines: %s\\n&#8221;,add,subs,loc }&#8217;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u9762\u4e0d\u884c\u5c31\u8fd9\u4e2a\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> git log &#8211;pretty=tformat: &#8211;numstat | gawk &#8216;{ add += $1 ; subs += $2 ; loc += $1 + $2 } END { printf &#8220;added lines: %s removed lines : %s total lines: %s\\n&#8221;,add,subs,loc }&#8217;&nbsp;<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u589e\u52a0\u7684\u4ee3\u7801\u884c\u6570\u91cf git log &#8211;stat|perl -ne &#8216;END { prin &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/thereisno.top\/?p=59\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cgit \u4ee3\u7801\u91cf\u7edf\u8ba1\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,12],"tags":[],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-git","category-12"],"_links":{"self":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=59"}],"version-history":[{"count":2,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":63,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/59\/revisions\/63"}],"wp:attachment":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}