3 ms·
Finally! I never understood the PR=branch model GitHub defaulted to. Stacked commits (ala Phabricator/Gerrit) always jived more with how my brain reasons abou
by bsimpson 6mo ago
Finally!
I never understood the PR=branch model GitHub defaulted to. Stacked commits (ala Phabricator/Gerrit) always jived more with how my brain reasons about changes.
Glad to see this option. I guess I'll have to install their CLI thing now.
- ezekg 6mo agoMy only complaint off the bat is the reliance on the GH CLI, which I don't use either. But maybe by the time it's GA they'll have added UI support.
- ZeWaka 6mo agoIt seems partially exposed in the UI with that dropdown. There's an 'add' and 'unstack' button. Probably relies on some internal metadata.
- ameliaquining 6mo agoYou can in fact do this from the web UI: https://github.github.com/gh-stack/guides/ui/#creating-a-stack-from-the-ui https://github.github.com/gh-stack/guides/ui/#creating-a-sta...
- ezekg 6mo agoI must have missed that. Amazing! From a reviewer's POV, this will be so nice to at the very least remove diff noise for PRs built on top of another PR. I usually refrain from reviewing child PRs until the parent is merged and the child can be rebased, for the sole reason that the diffs are hard to review i.r.t. what came from where.
- NooneAtAll3 6mo agodamn, I missed it as well presenting only cli commands in announcement wasn't a good choice
- SamuelAdams 6mo agoCLI is great because now I can tell my AI agent to do it. “Fix all dependabot security issues (copy logs) and run tests to validate functionality. Create each dependency as its own stack (or commit) so that contributors may review each library update easily.” Wait 10 minutes and you’re done.
- sameenkarim 6mo agoWe're shipping a skill file with the CLI: https://skills.sh/github/gh-stack/gh-stack https://skills.sh/github/gh-stack/gh-stack Everyone will have their own way of structuring stacks, but I've found it great for the agent to plan a stack structure that mirrors the work to be done.
- bmitc 6mo agoWhy don't you use the CLI?
- ezekg 6mo agoBecause git is all I need.
- bmitc 6mo agoThen why are you using GitHub? :) My point is that Git is just a component of the GitHub tool, and the GitHub CLI is quite good and helps automate many things in GitHub. For example, even just using `gh browse` and `gh pr create --web` and `gh pr view --web` are fantastic tools.
- ezekg 6mo agoI don't need to automate anything in GitHub, I have a web browser for when I need to use GitHub. Installing and learning another CLI seems like a waste of my time for very, very little return.
- bmitc 6mo agoYou would rather manually browse to the repo you're working on in the web interface rather than typing `gh browse`? I hate CLIs, in general, but the GitHub CLI has some very useful commands.
- sameenkarim 6mo agoStacked PRs can be created via the UI, API, or CLI. You can also run a combination of these. For ex, use another tool like jj to develop locally, push up the branches, and use the gh CLI to batch create a stack of n PRs, without touching local state.
- ezekg 6mo agoAmazing. Though this wasn't super obvious from the landing page or docs I read.
- contravariant 6mo agoHuh interesting, my mental model is unable to see any difference between them. I mean a branch is just jamming a flag into a commit with a polite note to move the flag along if you're working on it. You make a long trail, leave several flags and merge the whole thing back. Of course leaving multiple waypoints only makes sense if merging the earlier parts makes any sense, and if the way you continue actually depends on the previous work. If you can split it into several small changes made to a central branch it's a lot easier to merge things. Otherwise you risk making a new feature codependent on another even if there was no need to.