| ▲ | bentcorner 4 days ago | |||||||||||||||||||||||||||||||
> If you truly care about making more semantic history, split the work into multiple PRs. This exactly - if your commit history for a PR is interesting enough to split apart, then the original PR was too large and should have been split up to begin with. This is also a team culture thing - people won't make "clean" commits into a PR if they know people aren't going to be bisecting into them and trying to build. OTOH, having people spend time prepping good commits is potentially time wasted if nobody ever looks at the PR commit history aside from the PR reviewers. | ||||||||||||||||||||||||||||||||
| ▲ | hamburglar 4 days ago | parent | next [-] | |||||||||||||||||||||||||||||||
If I have a feature branch, and as part of that feature change, I did a simple refactor of something, I definitely want that committed as two separate commits in the PR, because you can look at the changes in isolation and it makes them a LOT easier to follow. And if you prefer, you can look at the diff of the entire PR in one single view. I don’t see the downside. And please do not come back with “you shouldn’t do a refactor as part of a feature change.” We don’t need to add bureaucracy to avoid a problem caused by failure to understand the power of good version control. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | imron 4 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||
> having people spend time prepping good commits is potentially time wasted if nobody ever looks at the PR commit history Good habits make good engineers. You never know which of your commits will cause a future problem so structuring all of them well means that when you need to reach for a tool like git bisect then your history makes it easy to find the cause of the problem. It takes next to no extra effort. | ||||||||||||||||||||||||||||||||