Some commits touch many files at once to do QoL or reformat code, with trivial diffs. These commits infamously muddy the output of git blame
.
However, since git v2.23, git allows you to provide a list of commits to ignore in the blame. This feature is called "ignore revision(s)"
You can provide these commits in multiple ways:
- the CLI flag
--ignore-rev <commit>
- the CLI flag
--ignore-revs-file
which accepts a file infsck.skipList
format (commits seperated by newlines, # prefixed comments allowed as of Git 2.20) NOTE: at time of writing (git v2.25.1) this flag will evaluate the path relative to your repo root, not your current working directory!