Say I have the following stack
main <- branch1 <- branch2 <- branch3
I'm on branch1, and just addressed some reviewer feedback by adding a few extra commits. Now I need to do the following:
- rebase
branch2 on branch1
- rebase
branch3 on branch2
I do not want to rebase branch1 on main right now.
My instinct is to call gh stack rebase --upstack while on branch1, where I just addressed the feedback and added commits. I was expecting that to do what I outlined above and not change branch1 in any way.
Surprisingly (to me), it did this:
- rebase
branch1 on main
- rebase
branch2 on branch1
- rebase
branch3 on branch2
Can I ask about why --upstack includes a rebase of the current branch on the branch under it? That actually feels a bit "down stack"-ish to me.
It feels like this exact workflow is going to be pretty common for me, and the current workaround is for me to gh stack switch up to branch2 and then run gh rebase --upstack, but that feels pretty unnatural to me!
Say I have the following stack
I'm on
branch1, and just addressed some reviewer feedback by adding a few extra commits. Now I need to do the following:branch2onbranch1branch3onbranch2I do not want to rebase
branch1onmainright now.My instinct is to call
gh stack rebase --upstackwhile onbranch1, where I just addressed the feedback and added commits. I was expecting that to do what I outlined above and not changebranch1in any way.Surprisingly (to me), it did this:
branch1onmainbranch2onbranch1branch3onbranch2Can I ask about why
--upstackincludes a rebase of the current branch on the branch under it? That actually feels a bit "down stack"-ish to me.It feels like this exact workflow is going to be pretty common for me, and the current workaround is for me to
gh stack switchup tobranch2and then rungh rebase --upstack, but that feels pretty unnatural to me!