Skip to content

Wishlist: .git blame ignore revs

Josh Soref edited this page Feb 25, 2024 · 5 revisions

.git-blame-ignore-revs

One concern people have about taking spelling fixes (or whitespace cleanup for that matter) is that blame is shifted (potentially for large swaths of the codebase) to a drive-by contributor.

It's actually possible to partially address this with the introduction of a file.

Consensus for the filename appears to be .git-blame-ignore-revs:

This isn't something that a cleanup PR itself should include, because it's reliant on the final commit-refs which aren't known until the PR is merged (especially if a project rebases, but also it'd be painful to maintain while responding to reviews).

But it shouldn't be particularly hard to write a bot which given a bunch of GitHub (or GitLab) PRs (or commits) generated a PR (or just a commit) to update the file.

It seems like a pretty neat small project, which someone could/should do.

Clone this wiki locally