- https://steveklabnik.github.io/jujutsu-tutorial
- https://justinpombrio.net/2025/02/11/jj-cheat-sheet.html
Rebase1
-s-r
That’s a little rough. There are some helpful diagrams in jj rebase --help that got me to understand the differences between -r, -s, and -b, but the short of it is that -r will sort of “rip out” a change and move it somewhere else. -s does that, but also moves descendants. In other words, imagine that we have a history like this:
A - B - C - D
If we jj rebase -r C to somewhere else, it will only move that revision, and so you end up with
A - B - D
Whereas -s operates more like I’d be used to with git: it takes the children too, so after jj rebase -s C, you’d have:
A - B
as both C and D are somewhere else now. -b works to rebase a branch.
$ jj rebase -s 'all:roots(trunk..@)' -d trunk
We’re rebasing all of the root changes from trunk to
@ontotrunk.