2026-02-27
assume zx denotes a local revset.
rebase a “branch” (parent including all children) to a “destination”
jj git fetch
jj rebase [-b/--branch <REVSETS>] -d/--destination <REVSETS>
# example
jj rebase -d main@github
jj rebase -b zx -d main@githubjj split [-r/--revision @] [FILESETS]...
# example
jj split -r zx
jj split path/to/file.txt # split path/to/file.txt out of @
jj split -i path/to/file.txt # split, but interactivemy $0.02, sometimes maybe, it’s simpler to
jj edit <REVSET> and fix the conflicts instead of
trying to mess around with jj split
(the most confusing.)
[remotes.origin]
auto-track-bookmarks = "*"
[remotes.github]
auto-track-bookmarks = "*"apparently jj tug’s the way to go; picking mine from here.
[aliases]
tug = ["bookmark", "move", "--from", "heads(::@- & bookmarks())", "--to", "latest(::@ ~ empty())"]jj git push --named myfeature=@
# example
jj git push --named myfeature=bor
jj bookmark create [-r/--revision <REVSET>] <NAMES>
# example
jj bookmark create -r zx myfeaturejj git push [-b/--bookmark <BOOKMARK>]since jj tracks bookmarks automatically, and on github,
you have the ‘delete branch after PR merged’ feature (idk what it’s
called); then jj gets confused.
to resolve this, first untrack the bookmark
assume you have the 3 commits; <foo>,
<bar>, <baz>.
jj bookmark untrack feat/foo
jj new main@github
jj rebase -b <baz> --onto main@github
<foo> should show up as (empty), and
can be jj abandoned.