Fri 11 Nov 2022

Exclude linting & formatting commits when running Git blame

Automatic code linters and formatters are a handy way to get consistent formatting across a codebase and avoid those painful bikeshedding arguments over exactly where the curly braces should go. But running one on an existing codebase has always come at a cost: the mess it creates in a commit history as the formatting commits insert themselves all over the git blame output, diverting you from the commits that made the last meaningful change. In fact this is often cited as the main reason folks won’t run a formatter on older codebases where the history is an important source of documentation.

Related posts

01/05

Fri 11 Nov 2022

Better Git diff output for Ruby, Python, Elixir, Go and more

Fri 11 Nov 2022

Why Git blame sucks for understanding WTF code (and what to use instead)

Fri 11 Nov 2022

How focused commits make you a better coder

Fri 11 Nov 2022

List your Git branches by recent activity