4 ms·
lol I love when people do this and it and now whenever I `git blame` their name shows up.
by breckenedge 2y ago
lol I love when people do this and it and now whenever I `git blame` their name shows up.
- jakub_g 2y agoFWIW, git now has options to ignore such commits. In a big codebase each big codemod sha should be added to the blame ignore file .git-blame-ignore-revs. It's supported by GitHub out of the box https://www.stefanjudis.com/today-i-learned/how-to-exclude-commits-from-git-blame/ https://www.stefanjudis.com/today-i-learned/how-to-exclude-c...
- clawlor 2y agoAgreed, this is quite annoying, but there is a workaround. You can tell blame to ignore commits like this, through a config option blame.ignoreRevsFile or similar CLI option. Not the most convenient perhaps, but it’s something. I believe GitHub also supports this, though you may have to request it to be enabled in your repository. Given this, I tend to prefer a single, formatting-only commit when introducing formatting standards to an existing codebase. Otherwise, it’s difficult to take advantage of QOL features like auto formatting in your editor, or other formatting tools which tend to operate on entire files. Then PRs end up being mixed with formatting changes, which adds friction to the review process.