commands.sh

jj duplicate

all

Create new changes with the same content as existing ones.

More info →

Options (3)

-d, --destinationboolean

Duplicate a revision onto a different parent

Example: jj duplicate {{[-d|--destination]}} {{dest_revset}} {{revset}}
-A, --insert-afterboolean

Duplicate a revision and insert it after other revision(s)

Example: jj duplicate {{[-A|--insert-after]}} {{after_revset}} {{revset}}
-B, --insert-beforeboolean

Duplicate a revision and insert it before other revision(s)

Example: jj duplicate {{[-B|--insert-before]}} {{before_revset}} {{revset}}

Examples (7)

Duplicate the current revision onto its existing parent

Duplicate a specific revision onto its existing parent

Duplicate a revision onto a different parent

jj duplicate [-d|--destination] dest_revset revset

Duplicate a revision and insert it after other revision(s)

jj duplicate [-A|--insert-after] after_revset revset

Duplicate a revision and insert it before other revision(s)

jj duplicate [-B|--insert-before] before_revset revset

Duplicate onto multiple parents (creates a merge commit)

jj duplicate [-d|--destination] destination1 [-d|--destination] destination2 revset

Duplicate multiple revisions

jj duplicate revset1 revset2 ...
made by @shridhargupta | data from tldr-pages