cockpit icon indicating copy to clipboard operation
cockpit copied to clipboard

git: add git blame ignore file

Open jelly opened this issue 3 years ago • 2 comments
trafficstars

Since Git 2.37.2 there is a new option in Git to configure revisions to be ignored by git blame. This can be used to ignore re-styling commits automatically by setting a git config option:

git config --global blame.ignoreRevsFile .git-blame-ignore-revs

As example I added the stylelint re-indentation commit, the configuration file name comes from https://www.michaelheap.com/git-ignore-rev/

jelly avatar Aug 13 '22 12:08 jelly

I'm not a huge fan of this proposal.

Why not just use git blame -w? (and -C -M for that matter)?

True that works for whitespace changes, in theory we could ignore pylint / stylelint fixes with this. Maybe we should discuss it in our weekly meeting :)

jelly avatar Aug 15 '22 09:08 jelly

Why not just use git blame -w? (and -C -M for that matter)? Maybe we should discuss it in our weekly meeting :)

:+1:

allisonkarlitskaya avatar Aug 15 '22 09:08 allisonkarlitskaya