> ## Content Index
> Fetch the complete content index at: https://madewithlove.com/blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# Ignoring revisions when using git blame
- URL: https://madewithlove.com/blog/ignoring-revisions-when-using-git-blame/
- Published: 2025-09-05T08:39:39.000Z
- Updated: 2026-06-24T08:06:33.000Z
- Description: Tired of git blame pointing to useless formatting commits? Learn how to ignore revisions with --ignore-rev or .git-blame-ignore-revs to keep Git history accurate and helpful.
- Author: Wouter Sioen
- Tags: Engineering, Code quality, Infrastructure, Team dynamics, Code review, Technical debt

You probably know the feeling: you're trying to figure out why something happened in a codebase, run `git blame`, and end up on that huge commit where you reformatted everything: every line changed, no functional impact. Finding the *real* author or commit message becomes a headache.

Luckily, Git provides tools to **ignore specific revisions when running `git blame`**, so your history stays helpful and focused.

## Stay in the loop

Subscribe 

Email sent! Check your inbox to complete your signup. 

Weekly insights for startup founders and technical leaders.

## Ignoring revisions through the command line

If you know the hash of the commit you want to ignore (for example `decade`), you can run:

```bash
git blame --ignore-rev decade app/Models/User.php

```

This tells Git to pretend that commit never existed for blame purposes, and instead look at who last changed the lines *before* that commit.

This is handy for quick checks. I usually use it to find what happened before a certain refactor, but I still want to see blame information about this refactor in other contexts, so I don't want to forever ignore this commit.

## Long-term tracking of revisions to ignore

For a more permanent and shareable solution, you can list unwanted revisions in a file called `.git-blame-ignore-revs` at the root of your repository.

For example, create a `.git-blame-ignore-revs` file containing:

```
decade # changed from tabs to spaces
facade # changed from 5 space indentation to 3 spaces

```

Then you can simply run:

```bash
git blame app/Models/User.php

```

Git will automatically ignore those commits if it's configured to do so. This will automatically be picked up in GitHub's blame view as well.

If this does not work, you might need to configure your local git setup to use the file to ignore revisions using this file.

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

```

Now, all future `git blame` commands will respect that file.

![](https://madewithlove.com/blog/content/images/2025/11/cta-software-eng.png) 

#### Fewer developers. More progress.

Our staff engineers join your team to improve how you build, not just what you build.

[Strengthen my team](https://madewithlove.com/services/software-engineering/)