Rebasing a Branch
If you run jj undo from the previous page, your history tree should
be:
○ zx Click alternates Xs and Os main <--- this branch
○ v Click sets an X
○ s Square has state
│ ○ o Play instructions
│ ○ kx Play manual
├─╯
○ n Square is interactive
○ ru Board() invokes Square()
~
How would you rebase the branch from s to zx on top of o?
You should get to:
○ zx Click alternates Xs and Os main
○ v Click sets an X
○ s Square has state
○ o Play instructions
○ kx Play manual
○ n Square is interactive
○ ru Board() invokes Square()
~
How would you undo that, using rebase and not undo?
Solution
Solution
The original base of s::zx was n, so the move is:
$ jj rebase -r "s::zx" -o n
○ zx Click alternates Xs and Os main
○ v Click sets an X
○ s Square has state
│ ○ o Play instructions
│ ○ kx Play manual
├─╯
○ n Square is interactive
○ ru Board() invokes Square()
~
Give yourself a pat on the back if you got it right.