Support ignore-revs-file in Github's blame view

In Git 2.23+, you can specify a list of commits to skip during git blame:

https://git-scm.com/docs/git-blame#Documentation/git-blame.txt—ignore-revs-fileltfilegt

This is very useful for hiding non-essential commits such as bulk code formatting.

A lot of projects are already using this format, e.g.:

https://github.com/nodejs/node/blob/master/deps/v8/.git-blame-ignore-revs

https://github.com/microsoft/accessibility-insights-web/blob/master/.ignoredRevs

https://github.com/llvm/llvm-project/blob/master/.git-blame-ignore-revs

Although this works fine in command line if you have Git >2.23 

git blame --ignore-revs-file .git-blame-ignore-revs some_file

or

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

It will be very nice to have this supported in Github’s native UI of git blame

129 Likes

Hi @sfdye,

Thank you for being here! As you know currently GitHub does not support this feature.

We’re always looking for ways to improve GitHub, so thanks for taking the time to write up your ideas about including a .git-blame-ignore-revs file to manage this!

I’ll pass this feature request on to the relevant team, although I’m afraid I can’t promise if or when they’ll implement this.

4 Likes

Hello, i would like to know if there is a plan for the implementation
.git-blame-ignore-revs ?

6 Likes

Hi @andreagriffiths11 ! This would be a really nice feature to have :slight_smile:

Has there been any progress? Does the relevant team at least have a ticket for it?

We’re just about to start using a .git-blame-ignore-revs file in our repo (https://github.com/locustio/locust)

5 Likes

Just wanted to +1 this suggestion! Would be incredibly helpful for my team as we have a lot of bulk changes from code reformatters

5 Likes

Totally agree, we definitely need it, as it’s extremely useful feature, no contest by now.

1 Like

It would be amazing!
Please consider adding this feature! :pray:

1 Like

Really useful feature for sure! +1

1 Like

+1 definitely want this for those times when you are setting up auto-formatting on an old project.

4 Likes

+1, useful for collaborative projects that have switched from one formatter to another. :pray:

+1, IMHO the webUI and the CLI should be consistent on what they are reporting, so it would really nice to have this support on GitHub!

Here’s a slightly more detailed gitlab issue for this feature:

There is also a preliminary discussion of adopting auto-formatting tools in CPython, which would benefit from this feature.

1 Like

+1 too, the great blame navigation of GitHub will positively benefit from this git feature!

+1 from here too, including this would be a lot better

I would also love to see this feature!

I would really appreciate this being implemented! If GitHub intends to have feature parity with Git we need this.

2 Likes

+1 this is a much needed option! It is pretty regular to have commits which just change formatting, tabs, line endings etc., it would be great if blame UI can skip those commits smoothly.

I’m +1 on this feature. it would be very helpful

+1 from us at Jina. We use GH’s interface a lot for PRs and navigating code. Ignoring our massive PR that introduce the black code formatter would be really nice

2 Likes

+1

The necessity of this feature is preventing us from implementing code formatters.

1 Like