docs/commands/jj.md
Flow wraps common Jujutsu (jj) workflows so you can stay in jj while remaining fully Git-compatible.
# Inspect workspace + home-branch state
f status
# Initialize jj (colocated with git when .git exists)
f jj init
# Create a feature bookmark and track origin
f jj bookmark create feature-x --track
# Fetch + rebase onto main + push bookmark
f jj sync --bookmark feature-x
f status — Show workflow-aware JJ status (workspace, home branch, leaf branches, working-copy summary, and next-step hints)f jj status — Show raw jj stf jj fetch — jj git fetchf jj rebase --dest <branch> — Rebase onto jj.default_branch (or main/master)f jj push --bookmark <name> — Push a single bookmarkf jj push --all — Push all bookmarksf jj sync --bookmark <name> — Fetch, rebase, then push bookmarkf jj workspace add <name> [--path <dir>] [--rev <rev>] — Create a workspace (optionally anchored to a revision)f jj workspace lane <name> [--path <dir>] [--base <rev>] [--remote <name>] [--no-fetch] — Create an isolated parallel lane from trunk defaultsf jj workspace review <branch> [--path <dir>] [--base <rev>] [--remote <name>] [--no-fetch] — Create or reuse a stable JJ review workspace for a branch without touching the current checkoutf jj workspace list — List workspacesf jj bookmark create <name> [--rev <rev>] [--track] — Create bookmarkf jj bookmark track <name> [--remote <remote>] — Track remote bookmarkUse f status before branch, workspace, commit, or publish operations.
It is the fast way to answer:
Example:
cd ~/code/org/project
f status
Use f jj status only when you want the raw Jujutsu working-copy view.
Use lanes when you want multiple active tasks in one repo without stash/pop churn:
# In your current repo, create isolated lanes anchored from trunk
f jj workspace lane fix-otp
f jj workspace lane testflight
# Work each lane independently
cd ~/.jj/workspaces/<repo>/fix-otp
jj st
f jj workspace lane does:
jj git fetch (unless --no-fetch)<default_branch>@<remote> when tracked (fallback: <default_branch>)@ working-copy commitUse a review workspace when you want an isolated JJ working copy for a review branch without touching the current repo checkout:
f jj workspace review review/alice-feature
cd ~/.jj/workspaces/<repo>/review-alice-feature
jj st
f jj workspace review does:
jj git fetch (unless --no-fetch)Important:
jj or f jj inside it.git still points at the main checkout, so this command intentionally does not run flow switch for you.Add to flow.toml:
[git]
remote = "myflow-i" # optional preferred writable remote
[jj]
default_branch = "main"
home_branch = "alice" # optional long-lived personal integration branch
remote = "origin" # optional legacy fallback if [git].remote is unset
auto_track = true
This keeps jj aligned with Git remotes while you work locally in jj.
If you keep a long-lived personal branch on top of trunk, set jj.home_branch and treat it as
your integration branch.
Then use short-lived review/* or codex/* branches on top of that home branch for task-specific
work. f status is optimized to make that shape visible.
Recommended flow:
# Default checkout stays on your home branch
cd ~/code/org/project
f status
# Branch-specific work happens in isolated workspaces
f jj workspace review review/alice-feature
cd ~/.jj/workspaces/project/review-alice-feature
f status
See also: