jj Verified current stable Not installed? Version Control

Jj / Split Revision To Destination

Split Revision To Destination

Use the jj split command to isolate a revision into a specified destination for development.

$
Terminal
jj split -r <revision> -d <revset>

When To Use

Isolating a revision for feature development during a refactor.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
jj split -r <revision> -d <revset>

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
Splitting revision abc123 to destination feature-branch...
Revision split successfully.
You can now work on feature-branch.

Power User Variants

Optimized versions

jj split -r abc123 -d feature-branch

Split revision abc123 into feature-branch.

jj split --revision abc123 --destination feature-branch

Use long options to split revision.

Unix Pipeline

Shell combinations

jj split -r abc123 -d feature-branch -d another-branch

Attempt to split into two destinations, which is invalid.

Troubleshooting

Common pitfalls

Invalid revision specified.

Solution: Ensure the revision exists in the repository.

Destination branch already exists.

Solution: Choose a different destination branch name.

Command Breakdown

What each part is doing

jj
Base Command
The executable that performs this operation. Here it runs Jj before the shell applies any redirect operators.
-r
r| revision
The value supplied for r| revision.
<revision>
revision
The value supplied for revision.
-d
d| destination
The value supplied for d| destination.
<revset>
revset
The value supplied for revset.
-r
Command Option
Tool-specific option used by this command invocation.
-d
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run `jj split -r <revision> -d <destination>` to split the revision.

  2. Step 2

    Verify the split by checking the destination branch.

Alternative Approaches

Comparable commands in other tools

Alternative version control tools for the same job.