home

jj one-pager (draft)

2025-11-17

assume zx denotes a local revset.

rebase

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@github

split

jj 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 interactive

my $0.02, sometimes maybe, it’s simpler to jj edit <REVSET> and fix the conflicts instead of trying to mess around with jj split

bookmarks

(the most confusing.)

local to remote

apparently jj tug’s the way to go; picking mine from here.

[aliases]
tug = ["bookmark", "move", "--from", "heads(::@- & bookmarks())", "--to", "latest(::@ ~ empty())"]

creation of the base bookmark

jj git push -N/--allow-new --named myfeature=@

# example
jj git push -N --named myfeature=b

or

jj bookmark create [-r/--revision <REVSET>] <NAMES>

# example
jj bookmark create -r zx myfeature

push

jj git push [-b/--bookmark <BOOKMARK>]

home