3 ms·
> Sometimes I'll get a pull request with like 2 lines of change and 120 lines of some reformating tool. The reformatting tools should be CI-enforced so you'll
by craftkiller 1y ago
> Sometimes I'll get a pull request with like 2 lines of change and 120 lines of some reformating tool.
The reformatting tools should be CI-enforced so you'll only end up with sudden massive changes like this once when you start using auto-formatters.
Regardless, tell your teammates to separate out formatting changes vs logic changes into separate commits (preferably separate PRs). Since they're auto-formatters it wouldn't even be any additional work, just:
git fetch origin
git checkout origin/main
git checkout -b formatting
./run_the_autoformatter.bash
git commit -a -m "Ran the auto-formatter, which should have been enforced by the CI."
git push -u origin formatting
- shepherdjerred 1y agoAnd then setup git-ignore-revs https://github.com/orgs/community/discussions/5033 https://github.com/orgs/community/discussions/5033
- craftkiller 1y agoAwesome, TIL about this feature. Thanks!