{"id":908,"date":"2021-03-05T18:40:11","date_gmt":"2021-03-05T09:40:11","guid":{"rendered":"http:\/\/www.opentone.co.jp\/ot-lab\/?p=908"},"modified":"2025-05-12T10:06:19","modified_gmt":"2025-05-12T01:06:19","slug":"git-commit","status":"publish","type":"post","link":"https:\/\/www.opentone.co.jp\/ot-lab\/all\/web-system\/git-commit","title":{"rendered":"git\u3067\u521d\u671f\u30b3\u30df\u30c3\u30c8\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u5909\u66f4\u3057\u305f\u3044"},"content":{"rendered":"\n<p>Repository\u3092\u4f5c\u6210\u3057\u904b\u7528\u3057\u3066\u3044\u308b\u306a\u304b\u3067\u3001<br>\u300c\u521d\u671f\u30b3\u30df\u30c3\u30c8\u3057\u305f\u3068\u304d\u306e\u30e6\u30fc\u30b6\u30fc\u540d(\u4ee5\u4e0b\u3001Author)\u9593\u9055\u3063\u3066\u305f\uff65\uff65\uff65\u300d\u306a\u3093\u3066\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u304b\uff1f<\/p>\n\n\n\n<p>\u79c1\u306f\u3042\u308b\u3093\u3067\u3059\u3051\u3069\u306d\u3002<\/p>\n\n\n\n<p>Author \u3092\u5909\u66f4\u3057\u305f\u3044\u3068\u304d\u306f <code>git rebase<\/code> \u3092\u4f7f\u3046\u3088\u3046\u3067\u3059\u304c\u3001<br>\u3053\u308c\u3060\u3068\u521d\u671f\u30b3\u30df\u30c3\u30c8\u306e Author \u306e\u5909\u66f4\u306f\u51fa\u6765\u306a\u3044\u3058\u3083\u3093\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u5834\u5408\u306f <code>git filter-branch<\/code> \uff01<\/p>\n\n\n\n<p>\u4f8b\u3048\u3070\u3053\u3093\u306a\u30ea\u30dd\u30b8\u30c8\u30ea\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>*       nemoto  2167350  (HEAD, origin\/feature\/4, origin\/develop, develop) fixed. #4\n| *     nemoto  d722b14  (origin\/feature\/3) fixed. #3\n|\/\n*       nemoto  b57f51f  (origin\/master, origin\/HEAD, master) Merge branch 'feature\/1' into develop\n|\\\n| *     test    a6ece0e  (origin\/feature\/1) fixed. #1\n* |     test    3999afb  (origin\/feature\/2) fixed. #2\n|\/\n*       test    b2d523a  initial commit\n<\/code><\/pre>\n\n\n\n<p>\u9593\u9055\u3063\u305f Author \u3092\u5909\u66f4\u3057\u305f\u3044\u5834\u5408 (test\u2192nemoto) \u306b\u306f\u4ee5\u4e0b\u3001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git filter-branch --commit-filter '\nGIT_AUTHOR_NAME=\"nemoto\"\ngit commit-tree \"$@\"\n' HEAD\n<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3067 Author \u3092\u5909\u66f4\u3059\u308b\u3068\u3001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>*       nemoto  2167350  (origin\/feature\/4, origin\/develop) fixed. #4\n| *     nemoto  d722b14  (origin\/feature\/3) fixed. #3\n|\/\n*       nemoto  b57f51f  (origin\/master, origin\/HEAD, refs\/original\/refs\/heads\/master) Merge branch 'feature\/1' into deve\n|\\\n| *     test    a6ece0e  (origin\/feature\/1) fixed. #1\n* |     test    3999afb  (origin\/feature\/2) fixed. #2\n|\/\n*       test    b2d523a  initial commit\n*       nemoto  77819b1  (HEAD, master) Merge branch 'feature\/1' into develop\n|\\\n| *     nemoto  3f46706  fixed. #1\n* |     nemoto  c378747  fixed. #2\n|\/\n*       nemoto  1584fd3  initial commit\n<\/code><\/pre>\n\n\n\n<p>\u3053\u3093\u306a\u611f\u3058\u306b\u306a\u308b\u306e\u3067\u3001 <code>git push -f<\/code> \u3057\u3066\u3042\u3052\u308b\u3068\u3001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>*       nemoto  2167350  (origin\/feature\/4, origin\/develop, develop) fixed. #4\n| *     nemoto  d722b14  (origin\/feature\/3) fixed. #3\n|\/\n*       nemoto  b57f51f  (refs\/original\/refs\/heads\/master) Merge branch 'feature\/1' into develop\n|\\\n| *     test    a6ece0e  (origin\/feature\/1) fixed. #1\n* |     test    3999afb  (origin\/feature\/2) fixed. #2\n|\/\n*       test    b2d523a  initial commit\n*       nemoto  77819b1  (HEAD, origin\/master, origin\/HEAD, master) Merge branch 'feature\/1' into develop\n|\\\n| *     nemoto  3f46706  fixed. #1\n* |     nemoto  c378747  fixed. #2\n|\/\n*       nemoto  1584fd3  initial commit\n<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b \u201cinitial commmit\u201d \u306e\u30e6\u30fc\u30b6\u30fc\u540d\u304c\u5909\u66f4\u3055\u308c\u307e\u3059 (commit id = 1584fd3)<\/p>\n\n\n\n<p>\u3061\u306a\u307f\u306b\u4ee5\u524d\u306e \u201cinitial commit\u201d (commit id = b2d523a) \u304c\u6b8b\u3063\u3066\u3044\u308b\u306e\u306f\u3001\u305d\u3053\u304b\u3089\u6d3e\u751f\u3057\u305f branch \u7b49\u304c\u5b58\u5728\u3057\u3066\u3044\u308b\u70ba\u3002<br>\u8a72\u5f53branch\u3092(\u4e0d\u8981\u306a\u3089)\u6d88\u3059\u3002<br>\u307e\u305f\u306f\u3001\u305d\u306ebranch\u306b <code>git checkout<\/code> \u3057\u3066\u540c\u69d8\u306b <code>git filter-branch<\/code> \u3059\u308b\u3053\u3068\u3067\u3001(\u6d3e\u751f\u3059\u308bbranch\u304c\u306a\u304f\u306a\u3063\u305f\u6642\u70b9\u3067)\u6d88\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4f46\u3057\u3001commit-id\u304c\u3001\u518d\u5ea6\u632f\u308a\u76f4\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u305d\u308c\u304c\u8a31\u5bb9\u3067\u304d\u308b\u306a\u3089\uff65\uff65\uff65\u3002<\/p>\n\n\n\n<p>\u3042\u30fc\u3002\u6700\u521d\u304b\u3089\u9593\u9055\u3048\u306a\u3044\u306e\u304c\u4e00\u756a\u304b\uff01<\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<p><em>\u6761\u4ef6\u5f0f\u3067\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u53ef<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git filter-branch --commit-filter '\nif &#091; \"$GIT_AUTHOR_NAME\" = \"test\" ]; then\n  GIT_AUTHOR_NAME=\"nemoto\"\nfi\ngit commit-tree \"$@\"\n' HEAD\n<\/code><\/pre>\n\n\n\n<p><em>Author\u4ee5\u5916\u3082\u53ef<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git filter-branch --commit-filter '\nGIT_AUTHOR_NAME=\"nemoto\"\nGIT_AUTHOR_EMAIL=\"nemoto@example.com\"\nGIT_COMMITTER_NAME=\"nemoto\"\nGIT_COMMITTER_EMAIL=\"nemoto@example.com\"\ngit commit-tree \"$@\"\n' HEAD\n<\/code><\/pre>\n<div class=\"opent-_2\" style=\"margin-top: 10px;margin-right: 10px;margin-bottom: 10px;margin-left: 10px;\" id=\"opent-3495219517\"><a href=\"https:\/\/www.opentone.co.jp\/backlog\/\" aria-label=\"twitter_backlogskt_new\"><img src=\"https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new.jpg\" alt=\"\"  srcset=\"https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new.jpg 1024w, https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new-300x157.jpg 300w, https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new-768x401.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" width=\"384\" height=\"200\"   \/><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>Repository\u3092\u4f5c\u6210\u3057\u904b\u7528\u3057\u3066\u3044\u308b\u306a\u304b\u3067\u3001\u300c\u521d\u671f\u30b3\u30df\u30c3\u30c8\u3057\u305f\u3068\u304d\u306e\u30e6\u30fc\u30b6\u30fc\u540d(\u4ee5\u4e0b\u3001Autho<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[28],"tags":[8],"class_list":["post-908","post","type-post","status-publish","format-standard","hentry","category-web-system","tag-blog",""],"acf":[],"aioseo_notices":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"engage-mag-carousel-img":false,"engage-mag-carousel-img-landscape":false,"engage-mag-carousel-large-img":false,"engage-mag-carousel-large-img-landscape":false,"engage-mag-large-thumb":false,"engage-mag-small-thumb":false},"uagb_author_info":{"display_name":"ah106rx4o4","author_link":"https:\/\/www.opentone.co.jp\/ot-lab\/author\/ah106rx4o4"},"uagb_comment_info":0,"uagb_excerpt":"Repository\u3092\u4f5c\u6210\u3057\u904b\u7528\u3057\u3066\u3044\u308b\u306a\u304b\u3067\u3001\u300c\u521d\u671f\u30b3\u30df\u30c3\u30c8\u3057\u305f\u3068\u304d\u306e\u30e6\u30fc\u30b6\u30fc\u540d(\u4ee5\u4e0b\u3001Autho","_links":{"self":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts\/908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/comments?post=908"}],"version-history":[{"count":1,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts\/908\/revisions"}],"predecessor-version":[{"id":909,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts\/908\/revisions\/909"}],"wp:attachment":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/media?parent=908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/categories?post=908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/tags?post=908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}