We have a massive, ancient codebase that needs a lot of cleanup. We have always had coding standards and everyone has always tried to follow them, but they were not enforced
Building on Mario's answer, I would suggest git shame as a global git-alias:
git config --global alias.shame 'blame -w -M'
...and use it instead of git-blame:
git shame path/to/file
To explain:
- -w Ignores whitespace changes, so not to blame someone who re-indented the code
- -M Detects lines that were moved or copied, and blames the original author