Is there a way to merge everything, within a stack...
# how-do-i
d
Is there a way to merge everything, within a stack, up to a specific PR? we are in a situation where we would like to merge everything that is on the stack on PR 1/X, before we finally merge 1/X (which now would be 1/1 since everything else would be merged on it) on trunk. so, is there a way to do that?
My guess would be to do
gt fold
on all the prs one by one, until it's only 1/1 left?
p
Yeah that seems like the right solution!
❤️ 1
d
hey @Pranathi Peri,so I folded everything on the 1st branch of the stack, my local stack shows as just 2 branches (the trunk and the 1 branch that now holds everything) however after
gt ss
my local (updated) stack, I am not asked to delete the branches that got merged, on the remote side of things. The graphite UI still shows a 25 branch stack, but the stack now only has 1. How can I bring the remote to reflect my current local stack? Thanks
For the record, I would have expected that
gt fold
would take care to delete the branch that got folded onto its parent, since it is no longer needed, and that graphite could track this and delete the branch from remote as well when
gt sync
is run again. Or at least be able to pass an argument such as
-D
to
gt fold
in order to delete the branch as well, if you do not want to do a destructive action by default