git blame -w app.js

Category: Git - Core

git blame -w app.js

Blame while ignoring whitespace changes

The -w flag ignores whitespace-only edits, so blame attributes lines to the commit that last changed their content. It stops a reformat commit from claiming authorship of every line. Combine it with -M to follow lines moved within the file.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.