When you need an isolated working copy for a review branch, use a JJ review workspace instead of switching your current checkout or creating an ad hoc temporary worktree.
This is the safest way to inspect, edit, and validate a review branch while leaving your current repo state untouched.
cd ~/code/org/project
f status
f jj workspace review review/alice-featureThis creates or reuses a stable workspace at:
~/.jj/workspaces/project/review-alice-featureThen work there:
cd ~/.jj/workspaces/project/review-alice-feature
f status- Your current checkout stays exactly as it is.
- The workspace path is stable and reusable.
- Another Codex or Claude session can work inside the review workspace safely.
- You avoid mixing “temporary scratch path” decisions into your review flow.
f statusmakes the home-branch versus review-workspace role explicit before you mutate anything.
f jj workspace review <branch> chooses the workspace base in this order:
--base <rev>if you passed one- the local Git branch commit for
<branch> - the remote Git branch commit for
<remote>/<branch> - trunk (
<default_branch>or<default_branch>@<remote>)
That makes the command useful both before and after the review branch exists locally.
If the review workspace already exists, Flow reuses it instead of creating another copy.
That means this is safe to run repeatedly:
f jj workspace review review/alice-featureYou get one stable place for that branch, not a pile of temporary directories.
Use jj or f jj inside the review workspace.
In a colocated repo, plain git still points at the main Git checkout, not the JJ workspace's
working-copy commit. Because of that, f jj workspace review intentionally does not try to run
branch-switching logic for you.
Recommended rule:
- inside the review workspace: use
jj/f jj - in the main checkout: use your normal Git or Flow branch-switch flow
# Create or reuse the review workspace
f jj workspace review review/alice-feature
# Move into it
cd ~/.jj/workspaces/project/review-alice-feature
# Inspect state
jj st
jj log -r @
# Make edits and commit as usual
jj describe -m "Adjust runtime startup behavior"
jj newIf you want a tracked bookmark for publishing later:
f jj bookmark create review/alice-feature --rev @ --track --remote originWhen you no longer need the workspace:
jj workspace list
jj workspace forget review-alice-feature
rm -rf ~/.jj/workspaces/project/review-alice-featureUse f jj workspace lane <name> when you want a new parallel line of work anchored from trunk.
Use f jj workspace review <branch> when the workspace should correspond to a specific review
branch and keep a stable branch-derived path.