Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

lol I love when people do this and it and now whenever I `git blame` their name shows up.


Agreed, 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.


FWIW, 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-c...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: