I have stack A -> B -> C -> D. Let's say ...
# how-do-i
e
I have stack A -> B -> C -> D. Let's say I merged A and B, but now I want to break away C from the stack, and have C and D be a separate stack. How can I "break up" the stack if the parent is merged? I tried upstacking onto main, but that didn't do it.
j
We don't currently have a way to do this. out of curiosity, why does this matter if A and B are already merged?
👍 1
e
I kept adding PRs on my stack, but at some point they became unrelated. I did not want to stack the parent of an unrelated PR to main branch and then later deal with merging, because I was going to submit the stack C and D for review after I merged A and B
I hope that made sense!
a
Can you just do
gt branch checkout D && gt upstack onto main
? Now C & D are separate stacks
And A & B are merged, so it doesn't matter anymore
m
are C & D still two branches on the separate stack? and you want to create a branch that's just C?
Copy code
C*
 /
| D
| |
| C
| |
|/
o main
b
+1 to the original question. I have a stack that has been growing for 10+ branches, the first few are merged. but, when I create a new branch on top the stack, the PR comments still reflect all the branches from the beginning even though they are merged. like this:
s
if you
gt repo sync --restack
, then i think it should show you a stack of main -> C -> D. the PR comment will still show A and B but effectively it's restacked.
j
+1 to the original question. I have a stack that has been growing for 10+ branches, the first few are merged. but, when I create a new branch on top the stack, the PR comments still reflect all the branches from the beginning even though they are merged. like this:
Removing PRs that have been merged or closed from the server-side dependencies is what we currently don't support
👍 2
It's something we hope to build in the future!
👍 2
e
Removing PRs that have been merged or closed from the server-side dependencies is what we currently don't support
Yep, this would be the feature for me! Like in this case for C and D, the reviewers wouldn't be seeing the downstack of A and B.