git: change styling (whitespace) without changing ownership/blame?

If you are trying to get a Root Cause issue using blame, don’t forget use the -w flag to ignore all the white-spaces or indentation changes. So you’ll get the last real change to the code, instead just an indentation, or removing trailing spaces.

git blame -w app/to/file.rb

or you can just use, git slap command..

git config alias.slap "blame -w";
git slap app/path/to/file.rb

having same results 😀

Leave a Comment