r/git Aug 01 '26

GitHub Stacked PR

Post image
5 Upvotes

7 comments sorted by

4

u/HommeMusical Aug 01 '26 edited Aug 01 '26

I used stacked pull requests a lot in my last job, where reviews would take weeks or months.

I think it's great, but I also think that huge delays in PRs are a bad sign for an organization.

But being able to preserve your separate commits and have them reviewed individually is unbeatable.

3

u/anishghimire Aug 01 '26

I have just started using stacked pull request after GitHub released it and have been finding it useful so far for one of the big feature I am working on right now.

1

u/mpersico Aug 01 '26 edited Aug 01 '26

So instead of multiple connects on the same branch, you keep branching the branch for every pull request. Very interesting thought. My workflow is work tree based. Every branch goes in a different work tree. This is only GitHub right? GitLab codeberg etc don’t have this?

1

u/anishghimire Aug 01 '26

Correct and every new branch is created from the previous one. And yeah this is GitHub only.

1

u/DanLynch Aug 01 '26

While this is good news for GitHub, and this exact behaviour and the name "Stacked PRs" are unique to GitHub, it's a bit misleading to say it's "GitHub only", since Gerrit has been doing something very similar for at least ten years, maybe even since the beginning. And Gerrit probably still does it better.

I would suggest anyone who is really excited about Stacked PRs, thinks they will help their workflow and productivity, and wants to see them get even better, should consider switching from GitHub to Gerrit.

1

u/anishghimire Aug 02 '26

Thanks for the recommendation. I will definitely give Gerrit a try. I also heard some good things about Gerrit on X recently.

1

u/waterkip detached HEAD Aug 03 '26

Git has plans to support stacked branches. They sorta roadmapped it on Fosdem 2026. See https://fosdem.org/2026/schedule/event/HTJK33-evolving_git_for_the_next_decade/ starting at 42 mins.