{"id":34988,"date":"2022-02-11T16:42:59","date_gmt":"2022-02-11T21:42:59","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=34988"},"modified":"2022-02-11T16:42:59","modified_gmt":"2022-02-11T21:42:59","slug":"git-config-blame-ignorerevsfile","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2022\/02\/11\/git-config-blame-ignorerevsfile\/","title":{"rendered":"git config blame.ignoreRevsFile"},"content":{"rendered":"<p><a href=\"https:\/\/www.moxio.com\/blog\/43\/ignoring-bulk-change-commits-with-git-blame\">Arnout Boks<\/a> (via <a href=\"https:\/\/twitter.com\/0xced\/status\/1463564859812028423\">C&eacute;dric Luthi<\/a>):<\/p>\n<blockquote cite=\"https:\/\/www.moxio.com\/blog\/43\/ignoring-bulk-change-commits-with-git-blame\"><p>A long-standing objection to making bulk changes to code using automated tools (e.g. to conform to a given code style) is that it clutters the output of <code>git blame<\/code>. With git 2.23, this does not have to be the case anymore!<\/p><p>[&#8230;]<\/p><p>Because these bulk changes render <code>git blame<\/code> useless, many teams refrain from applying automated style changes of this magnitude. That means they have to live with either a coding standard that they would rather not have, or with a codebase that does not follow their standards.<\/p><p>[&#8230;]<\/p><p>Using <a href=\"https:\/\/git-scm.com\/docs\/git-blame#Documentation\/git-blame.txt---ignore-revltrevgt\"><code>--ignore-rev<\/code><\/a>, one can specify a commit to be ignored by <code>git blame<\/code>.<\/p><p>[&#8230;]<\/p><p>When multiple bulk commits were added over time, it takes quite some effort to add a <code>--ignore-rev<\/code> for each of them in order to get a &lsquo;clean&rsquo; output for <code>git blame<\/code>. Luckily, git also provides a way to make this easier on us. In your repository, create a file to hold commit hashes of commits to be ignored by <code>git blame<\/code>. Naming this file <code>.git-blame-ignore-revs<\/code> seems to be a common convention.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Arnout Boks (via C&eacute;dric Luthi): A long-standing objection to making bulk changes to code using automated tools (e.g. to conform to a given code style) is that it clutters the output of git blame. With git 2.23, this does not have to be the case anymore![&#8230;]Because these bulk changes render git blame useless, many teams [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2022-02-11T21:43:01Z","apple_news_api_id":"cb464e78-5792-4e11-857e-38df4a79232e","apple_news_api_modified_at":"2022-02-11T21:43:01Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/Ay0ZOeFeSThGFfjjfSnkjLg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[377,71,376],"class_list":["post-34988","post","type-post","status-publish","format-standard","hentry","category-technology","tag-git","tag-programming","tag-versioncontrol"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=34988"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34988\/revisions"}],"predecessor-version":[{"id":34989,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34988\/revisions\/34989"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=34988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=34988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=34988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}