Skip to content

Commit 96b56fe

Browse files
jj-duplicate: add page (#19140)
Signed-off-by: Emmanuel Ferdman <[email protected]>
1 parent ae9f6ee commit 96b56fe

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

pages/common/jj-duplicate.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# jj duplicate
2+
3+
> Create new changes with the same content as existing ones.
4+
> More information: <https://jj-vcs.github.io/jj/latest/cli-reference/#jj-duplicate>.
5+
6+
- Duplicate the current revision onto its existing parent:
7+
8+
`jj duplicate`
9+
10+
- Duplicate a specific revision onto its existing parent:
11+
12+
`jj duplicate {{revset}}`
13+
14+
- Duplicate a revision onto a different parent:
15+
16+
`jj duplicate --destination {{dest_revset}} {{revset}}`
17+
18+
- Duplicate a revision and insert it **after** other revision(s):
19+
20+
`jj duplicate --insert-after {{after_revset}} {{revset}}`
21+
22+
- Duplicate a revision and insert it **before** other revision(s):
23+
24+
`jj duplicate --insert-before {{before_revset}} {{revset}}`
25+
26+
- Duplicate onto multiple parents (creates a merge commit):
27+
28+
`jj duplicate --destination {{destination1}} --destination {{destination2}} {{revset}}`
29+
30+
- Duplicate multiple revisions:
31+
32+
`jj duplicate {{revset1 revset2 ...}}`

0 commit comments

Comments
 (0)