{"id":1500,"date":"2017-06-20T10:42:06","date_gmt":"2017-06-20T01:42:06","guid":{"rendered":"http:\/\/www.chihayafuru.jp\/tech\/?p=1500"},"modified":"2023-03-16T15:06:34","modified_gmt":"2023-03-16T06:06:34","slug":"git%e3%81%ae%e3%82%b3%e3%83%9f%e3%83%83%e3%83%88%e3%82%b3%e3%83%a1%e3%83%b3%e3%83%88%e3%82%92%e6%a4%9c%e7%b4%a2%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/1500","title":{"rendered":"[git] \u30b3\u30df\u30c3\u30c8\u30ed\u30b0\u3092\u691c\u7d22\u3059\u308b"},"content":{"rendered":"<h3>1. \u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u304b\u3089\u691c\u7d22\u3059\u308b<\/h3>\n<pre class=\"lang:sh decode:true \" >git log --grep &lt;word&gt;<\/pre>\n<h4>\u5b9f\u884c\u4f8b<\/h4>\n<pre class=\"lang:sh decode:true \" >$ git log --grep \"#1234\"<\/pre>\n<h4>\u5b9f\u884c\u4f8b :\u3000\u5168\u30d6\u30e9\u30f3\u30c1<\/h4>\n<pre class=\"lang:sh decode:true \" >$ git log --all --grep \"GPIO\"<\/pre>\n<h4>\u5b9f\u884c\u4f8b :\u3000\u5927\u5c0f\u6587\u5b57\u533a\u5225\u306a\u3057<\/h4>\n<pre class=\"lang:sh decode:true \" >$ git log -i --grep \"code\"<\/pre>\n<h4>\u5b9f\u884c\u4f8b :\u3000\u6b63\u898f\u8868\u73fe<\/h4>\n<pre class=\"lang:sh decode:true \" >$ git log -E --grep \"c..e\"<\/pre>\n<p>&nbsp;<\/p>\n<h3>2. \u4fee\u6b63\u5dee\u5206\uff08\u8ffd\u52a0\uff0f\u524a\u9664\u884c\uff09\u3067\u691c\u7d22\u3059\u308b<\/h3>\n<pre class=\"lang:sh decode:true \" >$ git log -S\"ErrorLog\"<\/pre>\n<p>&nbsp;<\/p>\n<h3>4. \u30aa\u30fc\u30b5\u30fc(\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u4f5c\u6210\u8005)\u3067\u691c\u7d22\u3059\u308b<\/h3>\n<pre class=\"lang:sh decode:true \" >git log --author &lt;username&gt;<\/pre>\n<p>\u203b \u90e8\u5206\u4e00\u81f4\u53ef<\/p>\n<p>\u203b <b>author<\/b> : \u5143\u3005\u306e\u7de8\u96c6\u4f5c\u696d\u3092\u884c\u3063\u305f\u30e6\u30fc\u30b6\u30fc\u3002cherry-pick \u3084 rebase\u306e\u5143\uff08\u30aa\u30ea\u30b8\u30ca\u30eb\uff09\u3068\u306a\u308b\u30b3\u30df\u30c3\u30c8\u3092\u4f5c\u3063\u305f\u30e6\u30fc\u30b6\u30fc\u3002<\/p>\n<h3>4. \u30b3\u30df\u30c3\u30bf\u30fc(\u6700\u7d42\u66f4\u65b0\u8005)\u3067\u691c\u7d22\u3059\u308b<\/h3>\n<pre class=\"lang:sh decode:true \" >git log --committer &lt;username&gt;<\/pre>\n<p>\u203b \u90e8\u5206\u4e00\u81f4\u53ef<\/p>\n<p>\u203b <b>committer<\/b> : \u30b3\u30df\u30c3\u30c8\u3092\u4f5c\u3063\u305f\u30e6\u30fc\u30b6\u30fc\u3002\u7de8\u96c6\u4f5c\u696d\u3092\u30b3\u30df\u30c3\u30c8\u3068\u3057\u3066\u53cd\u6620\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u3002<\/p>\n<h3>5. \u4f8b<\/h3>\n<ul>\n<li><code>git commit<\/code> \u3067\u30b3\u30df\u30c3\u30c8\u3092\u4f5c\u3063\u305f\u3068\u304d\u306f author = committer \u3068\u306a\u308b\u3002<\/li>\n<li><code>git commit --amend<\/code> \u3067\u30b3\u30df\u30c3\u30c8\u3092\u4f5c\u3063\u305f\uff08\u66f8\u304d\u63db\u3048\u305f\uff09\u3068\u304d\u306f author \u306f\u305d\u306e\u307e\u307e\u3002 committer \u306f\u66f8\u304d\u63db\u3048\u3089\u308c\u308b\u3002<\/li>\n<li><code>git cherry-pick<\/code> \u3084 <code>git rebase<\/code> \u3067\u30b3\u30df\u30c3\u30c8\u3092\u4f5c\u3063\u305f\u3068\u304d\u306f author \u306f\u5143\u306e\u30b3\u30df\u30c3\u30c8\u3092\u8e0f\u8972\u3059\u308b\u3002 committer \u306f\u66f8\u304d\u63db\u3048\u3089\u308c\u308b\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1. \u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u304b\u3089\u691c\u7d22\u3059\u308b git log &#8211;grep &lt;word&gt; \u5b9f\u884c\u4f8b $ git log &#8211;grep &#8220;#1234&#8221; \u5b9f\u884c\u4f8b :\u3000\u5168\u30d6\u30e9\u30f3\u30c1 $ git log &#8211;all &#8211;grep [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[2],"class_list":["post-1500","post","type-post","status-publish","format-standard","hentry","category-memo","tag-git"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=1500"}],"version-history":[{"count":20,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1500\/revisions"}],"predecessor-version":[{"id":6095,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1500\/revisions\/6095"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=1500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=1500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=1500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}