This message was deleted.
# how-do-i
s
This message was deleted.
✅ 1
a
Are you asking about a branch topology like: A -> B -> C -> D -> E This is supported.
You can also create two separate stacks: A -> B C -> D And then use
gt move
to move one on top of the other (eg.
A -> B -> C -> D
We do not support multiple parents, so a topology like: A B \ / C (child) Will not work
s
Basically something like
Copy code
main -> A -> B -> C -> D
  (based on B) -> E -> F
In this case the two stacks would be independent, with
E
(and anything upstack) being based on B. Meaning, the E stack would be mergeable once B has made it into main.
Say that from the first stack, I merge PRs up until B, so the
E
stack can now point to main. What would be the steps to take there to make that change?
And regarding what you wrote in the first message, would that be a single stack? With branch D being based on B, but still being part of that stack? (Essentially meaning that branches in a stack don't have to be based on the newest branch, and can be based on some branch in the middle of the stack)
a
Say that from the first stack, I merge PRs up until B, so the
E
stack can now point to main. What would be the steps to take there to make that change?
gt sync -f --restack
should handle this for you
👍 1
(Essentially meaning that branches in a stack don't have to be based on the newest branch, and can be based on some branch in the middle of the stack)
Yes this is possible
>> Say that from the first stack, I merge PRs up until B, so the
E
stack can now point to main. What would be the steps to take there to make that change? You can create this through your normal flow. You can create A -> B -> C ->D. Then
gt checkout B
and then create E -> F. Merging and restack is handled by
gt sync
and
gt restack
s
I see, I'll play with restacking to try this out. Thanks a lot!