Live data from Hacker News

Stacked PRs are now live on GitHub

github.blog

281–290 of 308 posts

Re: Stacked PRs are now live on GitHub

#281

Earlier quoted context omitted.

Splitting changes into multiple commits is a much worse experience if you actually have self-contained dependent changes. 1. The whole review interface isn't set up for reviewing individual commits. 2. You can't merge changes progressively. 3. CI doesn't run on each commit. 4. If you have linear history (good idea IMO) you'll lose your nice commit history when you merge it. This is much better.

You can read each individual commit and review the PR as a whole. This is the way many people design and review PRs. You don’t need to merge those changes progressively. If you do, you go through exactly the same process of creating a separate branch and PR. The only difference is that GH has now added some UI and automation for rebasing and merging the PRs. In the past we would have explained the chaining in the PR…

Look at some level you want a "thing that is reviewed and has CI run on it" right? Unless you work alone you need that. Let us call that unit of work, a flob.

When you have written and submitted a flob for review, you often want to continue your work on top of that, and then you may end up with a second dependent flob that is finished before the first flob is merged.

You want both to be reviewed. You want CI to run on both. It's simply a much better experience if flobs are PRs rather than commits. I dunno how else to put it.

> stacked PRs were a thing before GH made these UX improvements

Not in a way that worked properly. You could sort of do it for PRs within a fork, but it was impossible across forks which is the way most open source GitHub PRs are done.

Re: Stacked PRs are now live on GitHub

#282
I didn't see the appeal of bespoke PR stacking tools when it was the headline feature of Graphite, and I still don't see it now.

Stacking PRs is useful, but I haven't encountered issues with the ergonomics of just using normal git operations to do it. My stacking workflow is roughly:

- Open the first PR from `branch-1` against `main`

- While waiting for a review on that first PR, if I need to build on subsequent work in `branch-1`, I'll `git checkout -b branch-2`, and open a draft PR against `branch-1`

- If the open review requires me to make changes to make changes to `branch-1`, I'll `git merge branch-1` on `branch-2` to pull them up the stack

- After `branch-1` is merged, my draft PR for `branch-2` will automatically update to being opened against `main`

- Repeat as necessary depending on how much stacking is requires and how far ahead I get against my reviewers

I don't find any of this all that difficult or cumbersome. Is there something that this feature offers, that I'm missing out on?

Re: Stacked PRs are now live on GitHub

#283
post #202

Earlier quoted context omitted.

Gerrit manages stacked changes with standard git tooling, except for the tiny change-id hook. Similar stable change identifier is also what enables Jujutsu to do its magic. Standardizing around something like this would be greatly beneficial, instead a ”gh” CLI is now needed to push a commit.

JJ, Gerrit, codebutler, and I think a couple of others have all basically agreed upon a syntax for change IDs and they are converging their prior ad-hoc formats into one; but last time I checked, the request to the upstream git team of "please don't silently drop the change-id header during rebase or amend" was met with bike-shedding about all the other hypothetical benefits that alternative formats could hypothetica…

This is roughly the current state of things as I know about it, that said I haven't read a lot of git's mailing list lately so it's possible that there have been some other developments.

Re: Stacked PRs are now live on GitHub

#284
post #176

Hey from the GitHub Stacked PRs team! Excited to release this more broadly so anyone can start stacking: https://gh.io/stacks Would love to hear any feedback, especially with the UI and CLI. We've got a lot more updates to the PR experience in store! Also happy to answer questions about the design decisions we made. There's a bunch happening behind the scenes, and it's one of the largest launches in GitHub history co…

I tried to look through this earlier. Am I right this is only available through the CLI? If so it’s a no go for me and my team. Which is too bad because it looks quite useful. An addition ability I would love, which is a MUCH bigger feature and I recognize that, would be multi-repo stacks. My company doesn’t use a monorepo, and I like that. But as we’ve been breaking monoliths sometimes a logical feature touches mult…

What do you gain by having multiple repos?

Re: Stacked PRs are now live on GitHub

#285

Earlier quoted context omitted.

Those could just be individual commits on a branch. Why does it need to be a stacked PR? That concept really only exists within the interfaces of these kinds of tools.

Yeah, I think it's largely a UI issue! I really want a UI that lets me review distinct changes that are dependent on each other, and handle comments/changes neatly within that structure. I've found GitHub quite lacking there historically. Also, if you're the mchristen I know, then I think we've had this discussion before haha! Hope you're well :)

Hah, indeed. I only know one Tao :) Some things never change I suppose

Re: Stacked PRs are now live on GitHub

#286

Earlier quoted context omitted.

Ok, then how do you approve/take the first 2 commits and not the last one? Or how do you insert a commit in between 2 commits or address feedback on a given commit? The person making the change is now going to have to run multiple confusing interactive rebases and git shenanigans, the rewrite the history of the PR branch on every feedback, then you have to re-review all the commits again because they are all differen…

Jujutsu makes all this easy

Jujutsu makes the author-side of it all fairly nice, indeed. But the reviewer-side has been so horribly abandoned by github that it has been frustrating me for a long while now.

Re: Stacked PRs are now live on GitHub

#287
post #246

I think it's telling how long it took GitHub to release a v1 of this feature. Folks have wanted this for a long time. Graphite came along and did it years ago (and I'm sure they pondered whether GitHub would do this). And the v1 is also a bit... basic, and buggy. And I'm surprised there's not clear documentation for agents (given using GitHub stacked PRs CLI won't be in models' training data yet). It does feel like G…

This feature was brought up amongst GitHub for years, possibly even a decade. And it was something that they didn't want. It was new leadership back in October that decided to build this, so it took them 9 months or so. To be clear, I am not saying this is a long amount of time, they had a LOT of work to do to get it to this point, just being clear about timelines.

I can't add on to my comment because it's been too long, but a great thread on how much work this is: https://x.com/sameenkarim/status/2083237928092721646

Re: Stacked PRs are now live on GitHub

#288
post #212

Earlier quoted context omitted.

I think it's a very Microsoft thing. It's a parallel evolution of software branching from the microcomputer era.

GitHub has a chance to get a generation of developers on to better coding practices. LLMs make it more feasible than ever to maintain high-quality patch series/stacked diffs — they can take care of all the mundane things like rebase conflicts for you. If I were in charge I would take this responsibility very seriously. I guess the next best thing would be to port spr to this. (Probably time to start looking at this t…

Not sure if it makes you feel better, but it seems there's at least a few startups trying to get a jujutsu-native forge going, by people who have seen and used the way Google's (and other big tech's) systems work.

Re: Stacked PRs are now live on GitHub

#289
post #49

Earlier quoted context omitted.

The PRs may be orthogonal but still be dependent. Feature X depends on improvement Y which also needs bugfix Z. You might go and implement X in a branch, tweaking the codebase as you go, but split the branch apart for review. You put X/Y/Z up, but X contains Y and Z, which means you can't request reviews for X without Y and Z merging, or else have a bunch of extra code that gets in the way.

Let's say that Z has an error (some assumption that does not hold), and needed to be reverted. How does that impact X's viability? I wouldn't trust any reviews of X after that. I strongly believe that PR should be compared to the main branch, and not rely on unmerged code. Unless you merge everything together in one go. And in the latter case, everything should be reviewed together.

My experience is that in companies that rely on this flow, these assumptions are generally hashed out during design doc review/discussions. I have never had it happen to me that I need to discard the rest of the stack for an assumption that did not hold. From another angle, if I fear that this might be the case, I hold off on sending parts of the stack to review until I am sure of the assumption holding OR I instead have a "workspace ball of mud" from which I can `split` out well-formed commits. I found this to be an incredibly productive workflow.

Re: Stacked PRs are now live on GitHub

#290

Earlier quoted context omitted.

Jujutsu makes all this easy

Jujutsu makes the author-side of it all fairly nice, indeed. But the reviewer-side has been so horribly abandoned by github that it has been frustrating me for a long while now.

A JujutsuHub.com business opportunity presents itself. How many tokens do you have?
Post reply on HN