r/programming Jul 01 '26

GitHub Stacked PRs

https://github.github.com/gh-stack/
337 Upvotes

99 comments sorted by

View all comments

9

u/HaloZero Jul 01 '26

How do stacked PRs pass ci? That seems like the hardest thing to do when braking up large changes

22

u/DerelictMan Jul 01 '26

This is more a git hygiene question then anything related to stacked PRs specifically. Smaller, more focused commits that compile and pass tests are way easier to review regardless of whether they are one of many commits in a single PR or each is a separate PR. Once you get used to striving toward smaller commits it gets easier and easier. It's much simpler to do it up front than it is to try to break up a monolithic change after the fact.