Loading video...

Video Failed to Load

Go Home

gh stack CLI now supports git worktrees 🥞 You can manage stacks where each branch is in a separate worktree, while still taking advantages of things like cascading stack rebases

40,542 views • 23 days ago •via X (Twitter)

16 Comments

erKam 🅰️'s profile picture
erKam 🅰️23 days ago

@github Stacked PRs are addictive. Once you start splitting, you can't stop. My agent made 2000-line diffs the norm, and nobody enjoys reviewing those. So I split a big booking flow bug fix into 4 PRs: refactor, old bugs, shared service, UI fixes. Will be reviewing them on Monday calmy

John Rees's profile picture
John Rees23 days ago

@github Oo nice! QQ. I've usually got several agents working in parallel, each in their own worktree in herdr. What happens if one of them runs a stack rebase while another agent is working on a different branch in the same stack?

Andrew Babbitt's profile picture
Andrew Babbitt23 days ago

@github How well does it work with the GH Copilot Desktop app and multiple threads / subagents? Did the stack skill also get an update as a part of this?

Kizuno18's profile picture
Kizuno1823 days ago

@github worktrees are the ultimate blast-radius isolation for agents: each branch in a separate checkout eliminates git index lock contention. in our pipeline targeting brazil, isolated worktrees let parallel agents test schema changes without disturbing production state. huge win

Amit Ghadge's profile picture
Amit Ghadge23 days ago

@github Manually resolve conflicts.

Sameen Karim's profile picture
Sameen Karim23 days ago

@github Your agents can use the CLI. It’s a wrapper around git rebase

FrançaisFaché's profile picture
FrançaisFaché23 days ago

@github Gave a try. Same bullshit as before, a little bit more pollished.

Shekhar Palit 🇺🇸's profile picture
Shekhar Palit 🇺🇸23 days ago

@github Please fix the CI bottleneck

Batuhan Cakir's profile picture
Batuhan Cakir23 days ago

@github can we also put the whole stack in the merge queue ?

Sameen Karim's profile picture
Sameen Karim23 days ago

@github Yes! We updated how stacks works with merge queue so it will always merge together in the same merge group

Batuhan Cakir's profile picture
Batuhan Cakir23 days ago

@github oh that sounds really nice

Sudara Fernando's profile picture
Sudara Fernando23 days ago

@github Have you guys thought about why we can’t merge the stack when 1 approval is needed even though all PRs in the stack are approved? It is a real blocker for us at the moment

Sameen Karim's profile picture
Sameen Karim23 days ago

@github We’re rolling out a fix for this next week. Sorry it’s taking so long, we needed to change a lot of security-related code

Matthew's profile picture
Matthew23 days ago

@github Yes!!!!

John Barker's profile picture
John Barker23 days ago

@github Any plans on being able to merge a stack as a single squashed commit into your main branch?

Sameen Karim's profile picture
Sameen Karim23 days ago

@github We discussed this and it would violate too many of our internal models unfortunately. Merging multiple PRs into one commit would cause issues with reverting PRs and associating approvals/rule evals to merge commits

Related Videos