4 ms·
In the part about whitespace diffs, you might want to mention ignore-revs-file [0]. We check an ignore-revs file into the repo, and anyone who does a significan
by wrs 3y ago
In the part about whitespace diffs, you might want to mention ignore-revs-file [0]. We check an ignore-revs file into the repo, and anyone who does a significant reformat adds that SHA to the file to avoid breaking git-blame.
[0] https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revltrevgt https://git-scm.com/docs/git-blame#Documentation/git-blame.t...
- schacon 3y agoI dont think I knew this. Great tip, thanks!
- js2 3y agoNote that git itself doesn't care what the ignore-revs file is called, but GitHub does. It has to be named `.git-blame-ignore-revs`: https://github.blog/changelog/2022-03-24-ignore-commits-in-the-blame-view-beta/ https://github.blog/changelog/2022-03-24-ignore-commits-in-t... One other thing you might want to be mention, which is obvious after thinking about it, is that updating the ignore-revs file has to occur in a commit after the one that you want to ignore, since you don't know what that first commit's ID is till after you make it. :-)
- wrs 3y agoYes! I recommend making a script that does that little dance automatically.