Remix.run Logo
borntyping 4 days ago

> Can someone explain why anyone would want non-squashed PRs? > > For the 5% of engineers that diligently split each PR into nice semantic changes, I suppose that's nice. But the vast majority of engineers don't do this.

I think cause and effect are the other way around here. You write and keep work-in-progress commits without caring about changes because the history will be discarded and the team will only look at pull requests as a single unit, and write tidy distinct commits because the history will be kept and individual commits will be reviewed.

I've done both, and getting everyone to do commits properly is much nicer, though GitHub and similar tools don't really support or encourage it. If you work with repository history a lot (for example, you have important repositories that aren't frequently committed to, or maintain many different versions of the project) it's invaluable. Most projects don't really care about the history—only the latest changes—and work with pull-requests, which is why they tend to use the squashed pull request approach.

baq 4 days ago | parent [-]

It’s mostly because pull requests are what is being tested in CI, not individual commits. Might as well squash as nobody wants to deal with untested in-between crap.

If you mean stacked PRs, yeah GitHub absolutely sucks. Gerrit a decade ago was a better experience.

chrishill89 3 days ago | parent | next [-]

> Might as well squash as nobody wants to deal with untested in-between crap.

I would rather deal with nice and tidy but untested commits rather than a very well-tested but too monolithic squash. If you test the eventual merge then you have done no less testing than the squash case.

Old commits are read more than they are run.

adastra22 4 days ago | parent | prev [-]

That's a problem with your CI. You can configure it to test all commits which make up the PR.

baq 4 days ago | parent [-]

My CI takes 20+ mins and costs meaningful $ per run. Not happening.

adastra22 4 days ago | parent [-]

> That's a problem with your CI.

baq 4 days ago | parent [-]

Yes, but not in the way you think.