Skip to main content
Test Double company logo
Services
Pragmatic Services Overview
Holistic software investment consulting
Acccelerate Software Delivery
Balance efficiency and quality
Improve Product Impact
Drive results that matter
Upgrade Rails Seamlessly
Update Ruby and Rails versions
Scale DevOps
Dev experience and infrastructure
Technical Recruitment
Build tech & product teams
Case Studies
Solutions
Legacy Modernization
Renovate legacy software systems
Pragmatic AI
Solve business problems without hype
Technical & Product Assessments
Uncover root causes & improvements
About
About
What's a test double?
Approach
Meeting you where you are
Founder's Story
The origin of our mission
Culture
Culture & Careers
Double Agents decoded
Great Causes
Great code for great causes
EDI
Equity, diversity & inclusion
Insights
All Insights
Hot takes and tips for all things software
Leadership
Bold opinions and insights for tech leaders
Developer
Essential coding tutorials and tools
Product Manager
Practical advice for real-world challenges
Say Hello
Test Double logo
Menu
Services
BackGrid of dots icon
Services Overview
Holistic software investment consulting
Software Delivery
Accelerate quality software development
Product Impact
Drive results that matter
Cycle icon
DevOps
Scale infrastructure smoothly
Upgrade Rails
Update Rails versions seamlessly
Technical Recruitment
Build tech & product teams
Case Studies
Solutions
Solutions
Legacy Modernization
Renovate legacy software systems
Pragmatic AI
Solve business problems without hype
Technical & Product Assessments
Uncover root causes & improvements
About
About
About
What's a test double?
Approach
Meeting you where you are
Founder's Story
The origin of our mission
Culture
Culture
Culture & Careers
Double Agents decoded
Great Causes
Great code for great causes
EDI
Equity, diversity & inclusion
Insights
Insights
All Insights
Hot takes and tips for all things software
Leadership
Bold opinions and insights for tech leaders
Developer
Essential coding tutorials and tools
Product Manager
Practical advice for real-world challenges
Say hello
Developers
Developers
Developers
Software tooling & tips

Ignore RuboCop changes in Git Blame

Hide refactoring commits in git-blame by using .git-blame-ignore-revs
Caleb Hearth
|
November 20, 2022
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Have you ever run git blame, looked at the commit for a line, and seen some big refactoring or formatting commit? It’s so frustrating not to be able to find the useful context on changes when this happens. When adding StandardRB or RuboCop, or when making changes to your rubocop.yml configuration, you’ll probably end up with a large commit like this that doesn’t include valuable context when spelunking history.

Enter .git-blame-ignore-revs. The format of the file is just a list of commit SHAs. The file will automatically cause GitHub to ignore the corresponding commit when in their blame view. You can also configure Git to ignore these commits by setting blame.ignoreRevsFile.

git config blame.ignoreRevsFile .git-blame-ignore-revs

One catch is that because git config is not part of the repository, each person using the repo will need to set this config on their own. Also note that git blame will error if the file isn’t present, so this is not a good candidate for global configuration.

Now, git blame and GitHub will ignore these big formatting commits. Never worry about mass reformatting again!

Related Insights

🔗
Building consensus for RuboCop in your team
🔗
Let's Standardize Rails!: An experiment in direct RuboCop democracy

Explore our insights

See all insights
Leadership
Leadership
Leadership
What is legacy software in the age of AI?

Software becomes legacy by succeeding long enough to accumulate the weight of every decision and shortcut made along the way. Users feel it as friction. Engineers feel their momentum slip. The business watches costs climb. AI changes two of those. The third may be getting worse.

by
Todd Kaufman
In the age of AI we’re in this together

The hardest part of the AI shift for developers isn't the tooling—it's the identity reassessment underneath it. Senior Software Consultant River Lynn Bailey shares what's helped her work through that fear and emerge on the other side.

by
River Lynn Bailey
Leadership
Leadership
Leadership
Organizational observability: The AI alignment problem starts upstream

Most agent misalignment doesn't start in the model. It starts upstream, in organizations that haven't made their own intent visible enough to navigate.

by
Dave Mosher
Letter art spelling out NEAT

Join the conversation

Technology is a means to an end: answers to very human questions. That’s why we created a community for developers and product managers.

Explore the community
Test Double Executive Leadership Team

Learn about our team

Like what we have to say about building great software and great teams?

Get to know us
Test Double company logo
Improving the way the world builds software.
What we do
Services OverviewSoftware DeliveryProduct StrategyLegacy ModernizationPragmatic AIDevOpsUpgrade RailsTechnical RecruitmentAssessments
Who WE ARE
About UsCulture & CareersGreat CausesEDIOur TeamContact UsNews & AwardsN.E.A.T.
Resources
Case StudiesAll InsightsLeadership InsightsDeveloper InsightsProduct InsightsPairing & Office Hours
NEWSLETTER
Sign up hear about our latest innovations.
Your email has been added!
Oops! Something went wrong while submitting the form.
Standard Ruby badge
614.349.4279hello@testdouble.com
Privacy PolicyTerms & Conditions
© 2020 Test Double. All Rights Reserved.