jj Verified current stable Not installed? Version Control

Jj / Move Existing Tag Different Revision

Move Existing Tag Different Revision

Easily reposition a tag to a new revision with the jj command, ensuring data integrity.

$
Terminal
jj tag s <tag_name> -r <revision> --allow-move

When To Use

Reposition a misapplied tag to maintain accurate historical data integrity.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
jj tag s <tag_name> -r <revision> --allow-move

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
Tag 'v1.0' moved to revision 'abc123'.

Operation completed successfully.

Power User Variants

Optimized versions

jj tag set tag_name -r revision --allow-move

Use short options for brevity.

jj tag set tag_name --revision revision --allow-move

Use long options for clarity.

Unix Pipeline

Shell combinations

jj tag set tag_name -r revision

Move tag without allowing move option.

jj tag set tag_name -r revision --allow-move

Move tag with explicit allow move.

Troubleshooting

Common pitfalls

Tag not found

Solution: Ensure the tag name is correct and exists.

Invalid revision

Solution: Check that the specified revision is valid and exists.

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.
s
s|set
The value supplied for s|set.
<tag_name>
tag name
The value supplied for tag name.
-r
r| revision
The value supplied for r| revision.
<revision>
revision
The value supplied for revision.
-r
Command Option
Tool-specific option used by this command invocation.
--allow-move
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run the command with 'set' or 's' to specify the action.

  2. Step 2

    Provide the tag name and the new revision using '-r' or '--revision'.

  3. Step 3

    Include '--allow-move' to permit the tag relocation.

Alternative Approaches

Comparable commands in other tools

Alternative version control tools for the same job.