jj-cli 0.14.0

Jujutsu - an experimental version control system
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
---
source: cli/tests/test_generate_md_cli_help.rs
description: "AUTO-GENERATED FILE, DO NOT EDIT. This cli reference is generated as an `insta` snapshot. MkDocs follows they symlink from docs/cli-reference.md to the snap. Unfortunately, `insta` unavoidably creates this header. Luckily, MkDocs ignores the header since it has the same format as Markdown headers. TODO: MkDocs may fail on Windows if symlinks are not enabled in the OS settings"
---

!!! warning

    This CLI reference is experimental. It is automatically generated, but
    does not match the `jj help` output exactly.

    <!-- See also https://github.com/ConnorGray/clap-markdown/issues -->

# Command-Line Help for `jj`

This document contains the help content for the `jj` command-line program.

**Command Overview:**

* [`jj`↴](#jj)
* [`jj abandon`↴](#jj-abandon)
* [`jj backout`↴](#jj-backout)
* [`jj branch`↴](#jj-branch)
* [`jj branch create`↴](#jj-branch-create)
* [`jj branch delete`↴](#jj-branch-delete)
* [`jj branch forget`↴](#jj-branch-forget)
* [`jj branch list`↴](#jj-branch-list)
* [`jj branch rename`↴](#jj-branch-rename)
* [`jj branch set`↴](#jj-branch-set)
* [`jj branch track`↴](#jj-branch-track)
* [`jj branch untrack`↴](#jj-branch-untrack)
* [`jj cat`↴](#jj-cat)
* [`jj chmod`↴](#jj-chmod)
* [`jj commit`↴](#jj-commit)
* [`jj config`↴](#jj-config)
* [`jj config list`↴](#jj-config-list)
* [`jj config get`↴](#jj-config-get)
* [`jj config set`↴](#jj-config-set)
* [`jj config edit`↴](#jj-config-edit)
* [`jj config path`↴](#jj-config-path)
* [`jj describe`↴](#jj-describe)
* [`jj diff`↴](#jj-diff)
* [`jj diffedit`↴](#jj-diffedit)
* [`jj duplicate`↴](#jj-duplicate)
* [`jj edit`↴](#jj-edit)
* [`jj files`↴](#jj-files)
* [`jj git`↴](#jj-git)
* [`jj git remote`↴](#jj-git-remote)
* [`jj git remote add`↴](#jj-git-remote-add)
* [`jj git remote remove`↴](#jj-git-remote-remove)
* [`jj git remote rename`↴](#jj-git-remote-rename)
* [`jj git remote list`↴](#jj-git-remote-list)
* [`jj git init`↴](#jj-git-init)
* [`jj git fetch`↴](#jj-git-fetch)
* [`jj git clone`↴](#jj-git-clone)
* [`jj git push`↴](#jj-git-push)
* [`jj git import`↴](#jj-git-import)
* [`jj git export`↴](#jj-git-export)
* [`jj init`↴](#jj-init)
* [`jj interdiff`↴](#jj-interdiff)
* [`jj log`↴](#jj-log)
* [`jj move`↴](#jj-move)
* [`jj new`↴](#jj-new)
* [`jj next`↴](#jj-next)
* [`jj obslog`↴](#jj-obslog)
* [`jj operation`↴](#jj-operation)
* [`jj operation abandon`↴](#jj-operation-abandon)
* [`jj operation log`↴](#jj-operation-log)
* [`jj operation undo`↴](#jj-operation-undo)
* [`jj operation restore`↴](#jj-operation-restore)
* [`jj prev`↴](#jj-prev)
* [`jj rebase`↴](#jj-rebase)
* [`jj resolve`↴](#jj-resolve)
* [`jj restore`↴](#jj-restore)
* [`jj root`↴](#jj-root)
* [`jj show`↴](#jj-show)
* [`jj sparse`↴](#jj-sparse)
* [`jj sparse list`↴](#jj-sparse-list)
* [`jj sparse set`↴](#jj-sparse-set)
* [`jj split`↴](#jj-split)
* [`jj squash`↴](#jj-squash)
* [`jj status`↴](#jj-status)
* [`jj tag`↴](#jj-tag)
* [`jj tag list`↴](#jj-tag-list)
* [`jj util`↴](#jj-util)
* [`jj util completion`↴](#jj-util-completion)
* [`jj util gc`↴](#jj-util-gc)
* [`jj util mangen`↴](#jj-util-mangen)
* [`jj util markdown-help`↴](#jj-util-markdown-help)
* [`jj util config-schema`↴](#jj-util-config-schema)
* [`jj undo`↴](#jj-undo)
* [`jj unsquash`↴](#jj-unsquash)
* [`jj untrack`↴](#jj-untrack)
* [`jj version`↴](#jj-version)
* [`jj workspace`↴](#jj-workspace)
* [`jj workspace add`↴](#jj-workspace-add)
* [`jj workspace forget`↴](#jj-workspace-forget)
* [`jj workspace list`↴](#jj-workspace-list)
* [`jj workspace root`↴](#jj-workspace-root)
* [`jj workspace update-stale`↴](#jj-workspace-update-stale)

## `jj`

Jujutsu (An experimental VCS)

To get started, see the tutorial at https://github.com/martinvonz/jj/blob/main/docs/tutorial.md.

**Usage:** `jj [OPTIONS] [COMMAND]`

###### **Subcommands:**

* `abandon` — Abandon a revision
* `backout` — Apply the reverse of a revision on top of another revision
* `branch` — Manage branches
* `cat` — Print contents of a file in a revision
* `chmod` — Sets or removes the executable bit for paths in the repo
* `commit` — Update the description and create a new change on top
* `config` — Manage config options
* `describe` — Update the change description or other metadata
* `diff` — Compare file contents between two commits
* `diffedit` — Touch up the content changes in a revision with a diff editor
* `duplicate` — Create a new change with the same content as an existing one
* `edit` — Edit a commit in the working copy
* `files` — List files in a revision
* `git` — Commands for working with the underlying Git repo
* `init` — Create a new repo in the given directory
* `interdiff` — Compare the changes of two commits
* `log` — Show commit history
* `move` — Move changes from one revision into another
* `new` — Create a new, empty change and (by default) edit it in the working copy
* `next` — Move the current working copy commit to the next child revision in the
repository.
* `obslog` — Show how a change has evolved
* `operation` — Commands for working with the operation log
* `prev` — Move the working copy commit to the parent of the current revision.
* `rebase` — Move revisions to different parent(s)
* `resolve` — Resolve a conflicted file with an external merge tool
* `restore` — Restore paths from another revision
* `root` — Show the current workspace root directory
* `show` — Show commit description and changes in a revision
* `sparse` — Manage which paths from the working-copy commit are present in the working copy
* `split` — Split a revision in two
* `squash` — Move changes from a revision into its parent
* `status` — Show high-level repo status
* `tag` — Manage tags
* `util` — Infrequently used commands such as for generating shell completions
* `undo` — Undo an operation (shortcut for `jj op undo`)
* `unsquash` — Move changes from a revision's parent into the revision
* `untrack` — Stop tracking specified paths in the working copy
* `version` — Display version information
* `workspace` — Commands for working with workspaces

###### **Options:**

* `-R`, `--repository <REPOSITORY>` — Path to repository to operate on
* `--ignore-working-copy` — Don't snapshot the working copy, and don't update it

  Possible values: `true`, `false`

* `--at-operation <AT_OPERATION>` — Operation to load the repo at

  Default value: `@`
* `-v`, `--verbose` — Enable verbose logging

  Possible values: `true`, `false`

* `--color <WHEN>` — When to colorize output (always, never, auto)
* `--no-pager` — Disable the pager

  Possible values: `true`, `false`

* `--config-toml <TOML>` — Additional configuration options (can be repeated)



## `jj abandon`

Abandon a revision

Abandon a revision, rebasing descendants onto its parent(s). The behavior is similar to `jj restore --changes-in`; the difference is that `jj abandon` gives you a new change, while `jj restore` updates the existing change.

**Usage:** `jj abandon [OPTIONS] [REVISIONS]...`

###### **Arguments:**

* `<REVISIONS>` — The revision(s) to abandon

  Default value: `@`

###### **Options:**

* `-s`, `--summary` — Do not print every abandoned commit on a separate line

  Possible values: `true`, `false`

* `-r` — Ignored (but lets you pass `-r` for consistency with other commands)

  Possible values: `true`, `false`




## `jj backout`

Apply the reverse of a revision on top of another revision

**Usage:** `jj backout [OPTIONS]`

###### **Options:**

* `-r`, `--revision <REVISION>` — The revision to apply the reverse of

  Default value: `@`
* `-d`, `--destination <DESTINATION>` — The revision to apply the reverse changes on top of

  Default value: `@`



## `jj branch`

Manage branches.

For information about branches, see https://github.com/martinvonz/jj/blob/main/docs/branches.md.

**Usage:** `jj branch <COMMAND>`

###### **Subcommands:**

* `create` — Create a new branch
* `delete` — Delete an existing branch and propagate the deletion to remotes on the next push
* `forget` — Forget everything about a branch, including its local and remote targets
* `list` — List branches and their targets
* `rename` — Rename `old` branch name to `new` branch name
* `set` — Update an existing branch to point to a certain commit
* `track` — Start tracking given remote branches
* `untrack` — Stop tracking given remote branches



## `jj branch create`

Create a new branch

**Usage:** `jj branch create [OPTIONS] <NAMES>...`

###### **Arguments:**

* `<NAMES>` — The branches to create

###### **Options:**

* `-r`, `--revision <REVISION>` — The branch's target revision



## `jj branch delete`

Delete an existing branch and propagate the deletion to remotes on the next push

**Usage:** `jj branch delete [NAMES]...`

###### **Arguments:**

* `<NAMES>` — The branches to delete

###### **Options:**

* `--glob <GLOB>` — Deprecated. Please prefix the pattern with `glob:` instead



## `jj branch forget`

Forget everything about a branch, including its local and remote targets.

A forgotten branch will not impact remotes on future pushes. It will be recreated on future pulls if it still exists in the remote.

**Usage:** `jj branch forget [NAMES]...`

###### **Arguments:**

* `<NAMES>` — The branches to forget

###### **Options:**

* `--glob <GLOB>` — Deprecated. Please prefix the pattern with `glob:` instead



## `jj branch list`

List branches and their targets

By default, a tracking remote branch will be included only if its target is different from the local target. A non-tracking remote branch won't be listed. For a conflicted branch (both local and remote), old target revisions are preceded by a "-" and new target revisions are preceded by a "+".

For information about branches, see https://github.com/martinvonz/jj/blob/main/docs/branches.md.

**Usage:** `jj branch list [OPTIONS] [NAMES]...`

###### **Arguments:**

* `<NAMES>` — Show branches whose local name matches

###### **Options:**

* `-a`, `--all` — Show all tracking and non-tracking remote branches including the ones whose targets are synchronized with the local branches

  Possible values: `true`, `false`

* `-r`, `--revisions <REVISIONS>` — Show branches whose local targets are in the given revisions



## `jj branch rename`

Rename `old` branch name to `new` branch name.

The new branch name points at the same commit as the old branch name.

**Usage:** `jj branch rename <OLD> <NEW>`

###### **Arguments:**

* `<OLD>` — The old name of the branch
* `<NEW>` — The new name of the branch



## `jj branch set`

Update an existing branch to point to a certain commit

**Usage:** `jj branch set [OPTIONS] <NAMES>...`

###### **Arguments:**

* `<NAMES>` — The branches to update

###### **Options:**

* `-r`, `--revision <REVISION>` — The branch's target revision
* `-B`, `--allow-backwards` — Allow moving the branch backwards or sideways

  Possible values: `true`, `false`




## `jj branch track`

Start tracking given remote branches

A tracking remote branch will be imported as a local branch of the same name. Changes to it will propagate to the existing local branch on future pulls.

**Usage:** `jj branch track <BRANCH@REMOTE>...`

###### **Arguments:**

* `<BRANCH@REMOTE>` — Remote branches to track



## `jj branch untrack`

Stop tracking given remote branches

A non-tracking remote branch is just a pointer to the last-fetched remote branch. It won't be imported as a local branch on future pulls.

**Usage:** `jj branch untrack <BRANCH@REMOTE>...`

###### **Arguments:**

* `<BRANCH@REMOTE>` — Remote branches to untrack



## `jj cat`

Print contents of a file in a revision

**Usage:** `jj cat [OPTIONS] <PATH>`

###### **Arguments:**

* `<PATH>` — The file to print

###### **Options:**

* `-r`, `--revision <REVISION>` — The revision to get the file contents from

  Default value: `@`



## `jj chmod`

Sets or removes the executable bit for paths in the repo

Unlike the POSIX `chmod`, `jj chmod` also works on Windows, on conflicted files, and on arbitrary revisions.

**Usage:** `jj chmod [OPTIONS] <MODE> <PATHS>...`

###### **Arguments:**

* `<MODE>`

  Possible values:
  - `n`:
    Make a path non-executable (alias: normal)
  - `x`:
    Make a path executable (alias: executable)

* `<PATHS>` — Paths to change the executable bit for

###### **Options:**

* `-r`, `--revision <REVISION>` — The revision to update

  Default value: `@`



## `jj commit`

Update the description and create a new change on top

**Usage:** `jj commit [OPTIONS] [PATHS]...`

###### **Arguments:**

* `<PATHS>` — Put these paths in the first commit

###### **Options:**

* `-i`, `--interactive` — Interactively choose which changes to include in the first commit

  Possible values: `true`, `false`

* `-m`, `--message <MESSAGE>` — The change description to use (don't open editor)



## `jj config`

Manage config options

Operates on jj configuration, which comes from the config file and environment variables.

For file locations, supported config options, and other details about jj config, see https://github.com/martinvonz/jj/blob/main/docs/config.md.

**Usage:** `jj config <COMMAND>`

###### **Subcommands:**

* `list` — List variables set in config file, along with their values
* `get` — Get the value of a given config option.
* `set` — Update config file to set the given option to a given value
* `edit` — Start an editor on a jj config file
* `path` — Print the path to the config file



## `jj config list`

List variables set in config file, along with their values

**Usage:** `jj config list [OPTIONS] [NAME]`

###### **Arguments:**

* `<NAME>` — An optional name of a specific config option to look up

###### **Options:**

* `--include-defaults` — Whether to explicitly include built-in default values in the list

  Possible values: `true`, `false`

* `--include-overridden` — Allow printing overridden values

  Possible values: `true`, `false`

* `--user` — Target the user-level config

  Possible values: `true`, `false`

* `--repo` — Target the repo-level config

  Possible values: `true`, `false`




## `jj config get`

Get the value of a given config option.

Unlike `jj config list`, the result of `jj config get` is printed without
extra formatting and therefore is usable in scripting. For example:

$ jj config list user.name
user.name="Martin von Zweigbergk"
$ jj config get user.name
Martin von Zweigbergk

**Usage:** `jj config get <NAME>`

###### **Arguments:**

* `<NAME>`



## `jj config set`

Update config file to set the given option to a given value

**Usage:** `jj config set <--user|--repo> <NAME> <VALUE>`

###### **Arguments:**

* `<NAME>`
* `<VALUE>`

###### **Options:**

* `--user` — Target the user-level config

  Possible values: `true`, `false`

* `--repo` — Target the repo-level config

  Possible values: `true`, `false`




## `jj config edit`

Start an editor on a jj config file.

Creates the file if it doesn't already exist regardless of what the editor does.

**Usage:** `jj config edit <--user|--repo>`

###### **Options:**

* `--user` — Target the user-level config

  Possible values: `true`, `false`

* `--repo` — Target the repo-level config

  Possible values: `true`, `false`




## `jj config path`

Print the path to the config file

A config file at that path may or may not exist.

See `jj config edit` if you'd like to immediately edit the file.

**Usage:** `jj config path <--user|--repo>`

###### **Options:**

* `--user` — Target the user-level config

  Possible values: `true`, `false`

* `--repo` — Target the repo-level config

  Possible values: `true`, `false`




## `jj describe`

Update the change description or other metadata

Starts an editor to let you edit the description of a change. The editor will be $EDITOR, or `pico` if that's not defined (`Notepad` on Windows).

**Usage:** `jj describe [OPTIONS] [REVISION]`

###### **Arguments:**

* `<REVISION>` — The revision whose description to edit

  Default value: `@`

###### **Options:**

* `-r` — Ignored (but lets you pass `-r` for consistency with other commands)

  Possible values: `true`, `false`

* `-m`, `--message <MESSAGE>` — The change description to use (don't open editor)
* `--stdin` — Read the change description from stdin

  Possible values: `true`, `false`

* `--no-edit` — Don't open an editor

  Possible values: `true`, `false`

* `--reset-author` — Reset the author to the configured user

  Possible values: `true`, `false`




## `jj diff`

Compare file contents between two commits

**Usage:** `jj diff [OPTIONS] [PATHS]...`

###### **Arguments:**

* `<PATHS>` — Restrict the diff to these paths

###### **Options:**

* `-r`, `--revision <REVISION>` — Show changes in this revision, compared to its parent(s)
* `--from <FROM>` — Show changes from this revision
* `--to <TO>` — Show changes to this revision
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted

  Possible values: `true`, `false`

* `--stat` — Show a histogram of the changes

  Possible values: `true`, `false`

* `--types` — For each path, show only its type before and after

  Possible values: `true`, `false`

* `--git` — Show a Git-format diff

  Possible values: `true`, `false`

* `--color-words` — Show a word-level diff with changes indicated only by color

  Possible values: `true`, `false`

* `--tool <TOOL>` — Generate diff by external command



## `jj diffedit`

Touch up the content changes in a revision with a diff editor

With the `-r` option, which is the default, starts a diff editor (`meld` by default) on the changes in the revision.

With the `--from` and/or `--to` options, starts a diff editor comparing the "from" revision to the "to" revision.

Edit the right side of the diff until it looks the way you want. Once you close the editor, the revision specified with `-r` or `--to` will be updated. Descendants will be rebased on top as usual, which may result in conflicts.

See `jj restore` if you want to move entire files from one revision to another. See `jj squash -i` or `jj unsquash -i` if you instead want to move changes into or out of the parent revision.

**Usage:** `jj diffedit [OPTIONS]`

###### **Options:**

* `-r`, `--revision <REVISION>` — The revision to touch up. Defaults to @ if neither --to nor --from are specified
* `--from <FROM>` — Show changes from this revision. Defaults to @ if --to is specified
* `--to <TO>` — Edit changes in this revision. Defaults to @ if --from is specified



## `jj duplicate`

Create a new change with the same content as an existing one

**Usage:** `jj duplicate [REVISIONS]...`

###### **Arguments:**

* `<REVISIONS>` — The revision(s) to duplicate

  Default value: `@`

###### **Options:**

* `-r` — Ignored (but lets you pass `-r` for consistency with other commands)

  Possible values: `true`, `false`




## `jj edit`

Edit a commit in the working copy

Puts the contents of a commit in the working copy for editing. Any changes you make in the working copy will update (amend) the commit.

**Usage:** `jj edit <REVISION>`

###### **Arguments:**

* `<REVISION>` — The commit to edit

###### **Options:**

* `-r` — Ignored (but lets you pass `-r` for consistency with other commands)

  Possible values: `true`, `false`




## `jj files`

List files in a revision

**Usage:** `jj files [OPTIONS] [PATHS]...`

###### **Arguments:**

* `<PATHS>` — Only list files matching these prefixes (instead of all files)

###### **Options:**

* `-r`, `--revision <REVISION>` — The revision to list files in

  Default value: `@`



## `jj git`

Commands for working with the underlying Git repo

For a comparison with Git, including a table of commands, see https://github.com/martinvonz/jj/blob/main/docs/git-comparison.md.

**Usage:** `jj git <COMMAND>`

###### **Subcommands:**

* `remote` — Manage Git remotes
* `init` — Create a new Git backed repo
* `fetch` — Fetch from a Git remote
* `clone` — Create a new repo backed by a clone of a Git repo
* `push` — Push to a Git remote
* `import` — Update repo with changes made in the underlying Git repo
* `export` — Update the underlying Git repo with changes made in the repo



## `jj git remote`

Manage Git remotes

The Git repo will be a bare git repo stored inside the `.jj/` directory.

**Usage:** `jj git remote <COMMAND>`

###### **Subcommands:**

* `add` — Add a Git remote
* `remove` — Remove a Git remote and forget its branches
* `rename` — Rename a Git remote
* `list` — List Git remotes



## `jj git remote add`

Add a Git remote

**Usage:** `jj git remote add <REMOTE> <URL>`

###### **Arguments:**

* `<REMOTE>` — The remote's name
* `<URL>` — The remote's URL



## `jj git remote remove`

Remove a Git remote and forget its branches

**Usage:** `jj git remote remove <REMOTE>`

###### **Arguments:**

* `<REMOTE>` — The remote's name



## `jj git remote rename`

Rename a Git remote

**Usage:** `jj git remote rename <OLD> <NEW>`

###### **Arguments:**

* `<OLD>` — The name of an existing remote
* `<NEW>` — The desired name for `old`



## `jj git remote list`

List Git remotes

**Usage:** `jj git remote list`



## `jj git init`

Create a new Git backed repo

**Usage:** `jj git init [OPTIONS] [DESTINATION]`

###### **Arguments:**

* `<DESTINATION>` — The destination directory where the `jj` repo will be created. If the directory does not exist, it will be created. If no directory is diven, the current directory is used

  Default value: `.`

###### **Options:**

* `--colocate` — Specifies that the `jj` repo should also be a valid `git` repo, allowing the use of both `jj` and `git` commands in the same directory

  Possible values: `true`, `false`

* `--git-repo <GIT_REPO>` — Specifies a path to an **existing** git repository to be used as the backing git repo for the newly created `jj` repo



## `jj git fetch`

Fetch from a Git remote

**Usage:** `jj git fetch [OPTIONS]`

###### **Options:**

* `--branch <BRANCH>` — Fetch only some of the branches

  Default value: `glob:*`
* `--remote <remote>` — The remote to fetch from (only named remotes are supported, can be repeated)
* `--all-remotes` — Fetch from all remotes

  Possible values: `true`, `false`




## `jj git clone`

Create a new repo backed by a clone of a Git repo

The Git repo will be a bare git repo stored inside the `.jj/` directory.

**Usage:** `jj git clone [OPTIONS] <SOURCE> [DESTINATION]`

###### **Arguments:**

* `<SOURCE>` — URL or path of the Git repo to clone
* `<DESTINATION>` — The directory to write the Jujutsu repo to

###### **Options:**

* `--colocate` — Whether or not to colocate the Jujutsu repo with the git repo

  Possible values: `true`, `false`




## `jj git push`

Push to a Git remote

By default, pushes any branches pointing to `remote_branches(remote=<remote>)..@`. Use `--branch` to push specific branches. Use `--all` to push all branches. Use `--change` to generate branch names based on the change IDs of specific commits.

**Usage:** `jj git push [OPTIONS]`

###### **Options:**

* `--remote <REMOTE>` — The remote to push to (only named remotes are supported)
* `-b`, `--branch <BRANCH>` — Push only this branch, or branches matching a pattern (can be repeated)
* `--all` — Push all branches (including deleted branches)

  Possible values: `true`, `false`

* `--tracked` — Push all tracked branches (including deleted branches)

  Possible values: `true`, `false`

* `--deleted` — Push all deleted branches

  Possible values: `true`, `false`

* `-r`, `--revisions <REVISIONS>` — Push branches pointing to these commits (can be repeated)
* `-c`, `--change <CHANGE>` — Push this commit by creating a branch based on its change ID (can be repeated)
* `--dry-run` — Only display what will change on the remote

  Possible values: `true`, `false`




## `jj git import`

Update repo with changes made in the underlying Git repo

**Usage:** `jj git import`



## `jj git export`

Update the underlying Git repo with changes made in the repo

**Usage:** `jj git export`



## `jj init`

Create a new repo in the given directory

If the given directory does not exist, it will be created. If no directory is given, the current directory is used.

**Usage:** `jj init [DESTINATION]`

###### **Arguments:**

* `<DESTINATION>` — The destination directory

  Default value: `.`

###### **Options:**

* `--git` — DEPRECATED: Use `jj git init` Use the Git backend, creating a jj repo backed by a Git repo

  Possible values: `true`, `false`

* `--git-repo <GIT_REPO>` — DEPRECATED: Use `jj git init` Path to a git repo the jj repo will be backed by



## `jj interdiff`

Compare the changes of two commits

This excludes changes from other commits by temporarily rebasing `--from` onto `--to`'s parents. If you wish to compare the same change across versions, consider `jj obslog -p` instead.

**Usage:** `jj interdiff [OPTIONS] <--from <FROM>|--to <TO>> [PATHS]...`

###### **Arguments:**

* `<PATHS>` — Restrict the diff to these paths

###### **Options:**

* `--from <FROM>` — Show changes from this revision
* `--to <TO>` — Show changes to this revision
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted

  Possible values: `true`, `false`

* `--stat` — Show a histogram of the changes

  Possible values: `true`, `false`

* `--types` — For each path, show only its type before and after

  Possible values: `true`, `false`

* `--git` — Show a Git-format diff

  Possible values: `true`, `false`

* `--color-words` — Show a word-level diff with changes indicated only by color

  Possible values: `true`, `false`

* `--tool <TOOL>` — Generate diff by external command



## `jj log`

Show commit history

**Usage:** `jj log [OPTIONS] [PATHS]...`

###### **Arguments:**

* `<PATHS>` — Show commits modifying the given paths

###### **Options:**

* `-r`, `--revisions <REVISIONS>` — Which revisions to show. Defaults to the `revsets.log` setting, or `@ | ancestors(immutable_heads().., 2) | heads(immutable_heads())` if it is not set
* `--reversed` — Show revisions in the opposite order (older revisions first)

  Possible values: `true`, `false`

* `-l`, `--limit <LIMIT>` — Limit number of revisions to show
* `--no-graph` — Don't show the graph, show a flat list of revisions

  Possible values: `true`, `false`

* `-T`, `--template <TEMPLATE>` — Render each revision using the given template
* `-p`, `--patch` — Show patch

  Possible values: `true`, `false`

* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted

  Possible values: `true`, `false`

* `--stat` — Show a histogram of the changes

  Possible values: `true`, `false`

* `--types` — For each path, show only its type before and after

  Possible values: `true`, `false`

* `--git` — Show a Git-format diff

  Possible values: `true`, `false`

* `--color-words` — Show a word-level diff with changes indicated only by color

  Possible values: `true`, `false`

* `--tool <TOOL>` — Generate diff by external command



## `jj move`

Move changes from one revision into another

Use `--interactive` to move only part of the source revision into the destination. The selected changes (or all the changes in the source revision if not using `--interactive`) will be moved into the destination. The changes will be removed from the source. If that means that the source is now empty compared to its parent, it will be abandoned. Without `--interactive`, the source change will always be empty.

If the source became empty and both the source and destination had a non-empty description, you will be asked for the combined description. If either was empty, then the other one will be used.

**Usage:** `jj move [OPTIONS] <--from <FROM>|--to <TO>> [PATHS]...`

###### **Arguments:**

* `<PATHS>` — Move only changes to these paths (instead of all paths)

###### **Options:**

* `--from <FROM>` — Move part of this change into the destination
* `--to <TO>` — Move part of the source into this change
* `-i`, `--interactive` — Interactively choose which parts to move

  Possible values: `true`, `false`




## `jj new`

Create a new, empty change and (by default) edit it in the working copy

By default, `jj` will edit the new change, making the working copy represent the new commit. This can be avoided with `--no-edit`.

Note that you can create a merge commit by specifying multiple revisions as argument. For example, `jj new main @` will create a new commit with the `main` branch and the working copy as parents.

For more information, see https://github.com/martinvonz/jj/blob/main/docs/working-copy.md.

**Usage:** `jj new [OPTIONS] [REVISIONS]...`

###### **Arguments:**

* `<REVISIONS>` — Parent(s) of the new change

  Default value: `@`

###### **Options:**

* `-r` — Ignored (but lets you pass `-r` for consistency with other commands)

  Possible values: `true`, `false`

* `-m`, `--message <MESSAGE>` — The change description to use
* `-L`, `--allow-large-revsets` — Deprecated. Please prefix the revset with `all:` instead

  Possible values: `true`, `false`

* `--no-edit` — Do not edit the newly created change

  Possible values: `true`, `false`

* `--edit` — No-op flag to pair with --no-edit

  Possible values: `true`, `false`

* `-A`, `--insert-after` — Insert the new change between the target commit(s) and their children

  Possible values: `true`, `false`

* `-B`, `--insert-before` — Insert the new change between the target commit(s) and their parents

  Possible values: `true`, `false`




## `jj next`

Move the current working copy commit to the next child revision in the
repository.

The command moves you to the next child in a linear fashion.

```text
D      D @
|      |/
C @ => C
|/     |
B      B
```

If `--edit` is passed, it will move you directly to the child
revision.

```text
D    D
|    |
C    C
|    |
B => @
|    |
@    A
```

**Usage:** `jj next [OPTIONS] [AMOUNT]`

###### **Arguments:**

* `<AMOUNT>` — How many revisions to move forward. By default advances to the next child

  Default value: `1`

###### **Options:**

* `--edit` — Instead of creating a new working-copy commit on top of the target commit (like `jj new`), edit the target commit directly (like `jj edit`)

  Possible values: `true`, `false`




## `jj obslog`

Show how a change has evolved

Show how a change has evolved as it's been updated, rebased, etc.

**Usage:** `jj obslog [OPTIONS]`

###### **Options:**

* `-r`, `--revision <REVISION>`

  Default value: `@`
* `-l`, `--limit <LIMIT>` — Limit number of revisions to show
* `--no-graph` — Don't show the graph, show a flat list of revisions

  Possible values: `true`, `false`

* `-T`, `--template <TEMPLATE>` — Render each revision using the given template
* `-p`, `--patch` — Show patch compared to the previous version of this change

  Possible values: `true`, `false`

* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted

  Possible values: `true`, `false`

* `--stat` — Show a histogram of the changes

  Possible values: `true`, `false`

* `--types` — For each path, show only its type before and after

  Possible values: `true`, `false`

* `--git` — Show a Git-format diff

  Possible values: `true`, `false`

* `--color-words` — Show a word-level diff with changes indicated only by color

  Possible values: `true`, `false`

* `--tool <TOOL>` — Generate diff by external command



## `jj operation`

Commands for working with the operation log

For information about the operation log, see https://github.com/martinvonz/jj/blob/main/docs/operation-log.md.

**Usage:** `jj operation <COMMAND>`

###### **Subcommands:**

* `abandon` — Abandon operation history
* `log` — Show the operation log
* `undo` — Create a new operation that undoes an earlier operation
* `restore` — Create a new operation that restores the repo to an earlier state



## `jj operation abandon`

Abandon operation history

To discard old operation history, use `jj op abandon ..<operation ID>`. It will abandon the specified operation and all its ancestors. The descendants will be reparented onto the root operation.

To discard recent operations, use `jj op restore <operation ID>` followed by `jj op abandon <operation ID>..@-`.

The abandoned operations, commits, and other unreachable objects can later be garbage collected by using `jj util gc` command.

**Usage:** `jj operation abandon <OPERATION>`

###### **Arguments:**

* `<OPERATION>` — The operation or operation range to abandon



## `jj operation log`

Show the operation log

**Usage:** `jj operation log [OPTIONS]`

###### **Options:**

* `-l`, `--limit <LIMIT>` — Limit number of operations to show
* `--no-graph` — Don't show the graph, show a flat list of operations

  Possible values: `true`, `false`

* `-T`, `--template <TEMPLATE>` — Render each operation using the given template



## `jj operation undo`

Create a new operation that undoes an earlier operation

This undoes an individual operation by applying the inverse of the operation.

**Usage:** `jj operation undo [OPTIONS] [OPERATION]`

###### **Arguments:**

* `<OPERATION>` — The operation to undo

  Default value: `@`

###### **Options:**

* `--what <WHAT>` — What portions of the local state to restore (can be repeated)

  Default values: `repo`, `remote-tracking`

  Possible values:
  - `repo`:
    The jj repo state and local branches
  - `remote-tracking`:
    The remote-tracking branches. Do not restore these if you'd like to push after the undo




## `jj operation restore`

Create a new operation that restores the repo to an earlier state

This restores the repo to the state at the specified operation, effectively undoing all later operations. It does so by creating a new operation.

**Usage:** `jj operation restore [OPTIONS] <OPERATION>`

###### **Arguments:**

* `<OPERATION>` — The operation to restore to

###### **Options:**

* `--what <WHAT>` — What portions of the local state to restore (can be repeated)

  Default values: `repo`, `remote-tracking`

  Possible values:
  - `repo`:
    The jj repo state and local branches
  - `remote-tracking`:
    The remote-tracking branches. Do not restore these if you'd like to push after the undo




## `jj prev`

Move the working copy commit to the parent of the current revision.


The command moves you to the parent in a linear fashion.

```text
D @  D
|/   |
A => A @
|    | /
B    B
```

If `--edit` is passed, it will move the working copy commit
directly to the parent.

```text
D @  D
|/   |
C => @
|    |
B    B
|    |
A    A
```

**Usage:** `jj prev [OPTIONS] [AMOUNT]`

###### **Arguments:**

* `<AMOUNT>` — How many revisions to move backward. By default moves to the parent

  Default value: `1`

###### **Options:**

* `--edit` — Edit the parent directly, instead of moving the working-copy commit

  Possible values: `true`, `false`




## `jj rebase`

Move revisions to different parent(s)

There are three different ways of specifying which revisions to rebase:
`-b` to rebase a whole branch, `-s` to rebase a revision and its
descendants, and `-r` to rebase a single commit. If none of them is
specified, it defaults to `-b @`.

With `-s`, the command rebases the specified revision and its descendants
onto the destination. For example, `jj rebase -s M -d O` would transform
your history like this (letters followed by an apostrophe are post-rebase
versions):

```text
O           N'
|           |
| N         M'
| |         |
| M         O
| |    =>   |
| | L       | L
| |/        | |
| K         | K
|/          |/
J           J
```

With `-b`, the command rebases the whole "branch" containing the specified
revision. A "branch" is the set of commits that includes:

* the specified revision and ancestors that are not also ancestors of the
  destination
* all descendants of those commits

In other words, `jj rebase -b X -d Y` rebases commits in the revset
`(Y..X)::` (which is equivalent to `jj rebase -s 'roots(Y..X)' -d Y` for a
single root). For example, either `jj rebase -b L -d O` or `jj rebase -b M
-d O` would transform your history like this (because `L` and `M` are on the
same "branch", relative to the destination):

```text
O           N'
|           |
| N         M'
| |         |
| M         | L'
| |    =>   |/
| | L       K'
| |/        |
| K         O
|/          |
J           J
```

With `-r`, the command rebases only the specified revision onto the
destination. Any "hole" left behind will be filled by rebasing descendants
onto the specified revision's parent(s). For example, `jj rebase -r K -d M`
would transform your history like this:

```text
M          K'
|          |
| L        M
| |   =>   |
| K        | L'
|/         |/
J          J
```

Note that you can create a merge commit by repeating the `-d` argument.
For example, if you realize that commit L actually depends on commit M in
order to work (in addition to its current parent K), you can run `jj rebase
-s L -d K -d M`:

```text
M          L'
|          |\
| L        M |
| |   =>   | |
| K        | K
|/         |/
J          J
```

**Usage:** `jj rebase [OPTIONS] --destination <DESTINATION>`

###### **Options:**

* `-b`, `--branch <BRANCH>` — Rebase the whole branch relative to destination's ancestors (can be repeated)
* `-s`, `--source <SOURCE>` — Rebase specified revision(s) together their tree of descendants (can be repeated)
* `-r`, `--revision <REVISION>` — Rebase only this revision, rebasing descendants onto this revision's parent(s)
* `-d`, `--destination <DESTINATION>` — The revision(s) to rebase onto (can be repeated to create a merge commit)
* `--skip-empty` — If true, when rebasing would produce an empty commit, the commit is skipped. Will never skip merge commits with multiple non-empty parents. Will never skip the working commit

  Possible values: `true`, `false`

* `-L`, `--allow-large-revsets` — Deprecated. Please prefix the revset with `all:` instead

  Possible values: `true`, `false`




## `jj resolve`

Resolve a conflicted file with an external merge tool

Only conflicts that can be resolved with a 3-way merge are supported. See docs for merge tool configuration instructions.

Note that conflicts can also be resolved without using this command. You may edit the conflict markers in the conflicted file directly with a text editor.

**Usage:** `jj resolve [OPTIONS] [PATHS]...`

###### **Arguments:**

* `<PATHS>` — Restrict to these paths when searching for a conflict to resolve. We will attempt to resolve the first conflict we can find. You can use the `--list` argument to find paths to use here

###### **Options:**

* `-r`, `--revision <REVISION>`

  Default value: `@`
* `-l`, `--list` — Instead of resolving one conflict, list all the conflicts

  Possible values: `true`, `false`

* `-q`, `--quiet` — Do not print the list of remaining conflicts (if any) after resolving a conflict

  Possible values: `true`, `false`




## `jj restore`

Restore paths from another revision

That means that the paths get the same content in the destination (`--to`) as they had in the source (`--from`). This is typically used for undoing changes to some paths in the working copy (`jj restore <paths>`).

If only one of `--from` or `--to` is specified, the other one defaults to the working copy.

When neither `--from` nor `--to` is specified, the command restores into the working copy from its parent(s). `jj restore` without arguments is similar to `jj abandon`, except that it leaves an empty revision with its description and other metadata preserved.

See `jj diffedit` if you'd like to restore portions of files rather than entire files.

**Usage:** `jj restore [OPTIONS] [PATHS]...`

###### **Arguments:**

* `<PATHS>` — Restore only these paths (instead of all paths)

###### **Options:**

* `--from <FROM>` — Revision to restore from (source)
* `--to <TO>` — Revision to restore into (destination)
* `-c`, `--changes-in <REVISION>` — Undo the changes in a revision as compared to the merge of its parents
* `-r`, `--revision <REVISION>` — Prints an error. DO NOT USE



## `jj root`

Show the current workspace root directory

**Usage:** `jj root`



## `jj show`

Show commit description and changes in a revision

**Usage:** `jj show [OPTIONS] [REVISION]`

###### **Arguments:**

* `<REVISION>` — Show changes in this revision, compared to its parent(s)

  Default value: `@`

###### **Options:**

* `-r` — Ignored (but lets you pass `-r` for consistency with other commands)

  Possible values: `true`, `false`

* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted

  Possible values: `true`, `false`

* `--stat` — Show a histogram of the changes

  Possible values: `true`, `false`

* `--types` — For each path, show only its type before and after

  Possible values: `true`, `false`

* `--git` — Show a Git-format diff

  Possible values: `true`, `false`

* `--color-words` — Show a word-level diff with changes indicated only by color

  Possible values: `true`, `false`

* `--tool <TOOL>` — Generate diff by external command



## `jj sparse`

Manage which paths from the working-copy commit are present in the working copy

**Usage:** `jj sparse <COMMAND>`

###### **Subcommands:**

* `list` — List the patterns that are currently present in the working copy
* `set` — Update the patterns that are present in the working copy



## `jj sparse list`

List the patterns that are currently present in the working copy

By default, a newly cloned or initialized repo will have have a pattern matching all files from the repo root. That pattern is rendered as `.` (a single period).

**Usage:** `jj sparse list`



## `jj sparse set`

Update the patterns that are present in the working copy

For example, if all you need is the `README.md` and the `lib/` directory, use `jj sparse set --clear --add README.md --add lib`. If you no longer need the `lib` directory, use `jj sparse set --remove lib`.

**Usage:** `jj sparse set [OPTIONS]`

###### **Options:**

* `--add <ADD>` — Patterns to add to the working copy
* `--remove <REMOVE>` — Patterns to remove from the working copy
* `--clear` — Include no files in the working copy (combine with --add)

  Possible values: `true`, `false`

* `--edit` — Edit patterns with $EDITOR

  Possible values: `true`, `false`

* `--reset` — Include all files in the working copy

  Possible values: `true`, `false`




## `jj split`

Split a revision in two

Starts a diff editor (`meld` by default) on the changes in the revision. Edit the right side of the diff until it has the content you want in the first revision. Once you close the editor, your edited content will replace the previous revision. The remaining changes will be put in a new revision on top.

If the change you split had a description, you will be asked to enter a change description for each commit. If the change did not have a description, the second part will not get a description, and you will be asked for a description only for the first part.

**Usage:** `jj split [OPTIONS] [PATHS]...`

###### **Arguments:**

* `<PATHS>` — Put these paths in the first commit

###### **Options:**

* `-i`, `--interactive` — Interactively choose which parts to split. This is the default if no paths are provided

  Possible values: `true`, `false`

* `-r`, `--revision <REVISION>` — The revision to split

  Default value: `@`



## `jj squash`

Move changes from a revision into its parent

After moving the changes into the parent, the child revision will have the same content state as before. If that means that the change is now empty compared to its parent, it will be abandoned. Without `--interactive`, the child change will always be empty.

If the source became empty and both the source and destination had a non-empty description, you will be asked for the combined description. If either was empty, then the other one will be used.

**Usage:** `jj squash [OPTIONS] [PATHS]...`

###### **Arguments:**

* `<PATHS>` — Move only changes to these paths (instead of all paths)

###### **Options:**

* `-r`, `--revision <REVISION>`

  Default value: `@`
* `-m`, `--message <MESSAGE>` — The description to use for squashed revision (don't open editor)
* `-i`, `--interactive` — Interactively choose which parts to squash

  Possible values: `true`, `false`




## `jj status`

Show high-level repo status

This includes:

* The working copy commit and its (first) parent, and a summary of the changes between them

* Conflicted branches (see https://github.com/martinvonz/jj/blob/main/docs/branches.md)

**Usage:** `jj status`



## `jj tag`

Manage tags

**Usage:** `jj tag <COMMAND>`

###### **Subcommands:**

* `list` — List tags



## `jj tag list`

List tags

**Usage:** `jj tag list [NAMES]...`

###### **Arguments:**

* `<NAMES>` — Show tags whose local name matches



## `jj util`

Infrequently used commands such as for generating shell completions

**Usage:** `jj util <COMMAND>`

###### **Subcommands:**

* `completion` — Print a command-line-completion script
* `gc` — Run backend-dependent garbage collection
* `mangen` — Print a ROFF (manpage)
* `markdown-help` — Print the CLI help for all subcommands in Markdown
* `config-schema` — Print the JSON schema for the jj TOML config format



## `jj util completion`

Print a command-line-completion script

Apply it by running one of these:

- **bash**: `source <(jj util completion)`
- **fish**: `jj util completion --fish | source`
- **zsh**:
    ```shell
    autoload -U compinit
    compinit
    source <(jj util completion --zsh)
    ```

**Usage:** `jj util completion [SHELL]`

###### **Arguments:**

* `<SHELL>`

  Possible values: `bash`, `elvish`, `fish`, `powershell`, `zsh`


###### **Options:**

* `--bash` — Deprecated. Use the SHELL positional argument instead

  Possible values: `true`, `false`

* `--fish` — Deprecated. Use the SHELL positional argument instead

  Possible values: `true`, `false`

* `--zsh` — Deprecated. Use the SHELL positional argument instead

  Possible values: `true`, `false`




## `jj util gc`

Run backend-dependent garbage collection

**Usage:** `jj util gc [OPTIONS]`

###### **Options:**

* `--expire <EXPIRE>` — Time threshold



## `jj util mangen`

Print a ROFF (manpage)

**Usage:** `jj util mangen`



## `jj util markdown-help`

Print the CLI help for all subcommands in Markdown

**Usage:** `jj util markdown-help`



## `jj util config-schema`

Print the JSON schema for the jj TOML config format

**Usage:** `jj util config-schema`



## `jj undo`

Undo an operation (shortcut for `jj op undo`)

**Usage:** `jj undo [OPTIONS] [OPERATION]`

###### **Arguments:**

* `<OPERATION>` — The operation to undo

  Default value: `@`

###### **Options:**

* `--what <WHAT>` — What portions of the local state to restore (can be repeated)

  Default values: `repo`, `remote-tracking`

  Possible values:
  - `repo`:
    The jj repo state and local branches
  - `remote-tracking`:
    The remote-tracking branches. Do not restore these if you'd like to push after the undo




## `jj unsquash`

Move changes from a revision's parent into the revision

After moving the changes out of the parent, the child revision will have the same content state as before. If moving the change out of the parent change made it empty compared to its parent, it will be abandoned. Without `--interactive`, the parent change will always become empty.

If the source became empty and both the source and destination had a non-empty description, you will be asked for the combined description. If either was empty, then the other one will be used.

**Usage:** `jj unsquash [OPTIONS]`

###### **Options:**

* `-r`, `--revision <REVISION>`

  Default value: `@`
* `-i`, `--interactive` — Interactively choose which parts to unsquash

  Possible values: `true`, `false`




## `jj untrack`

Stop tracking specified paths in the working copy

**Usage:** `jj untrack <PATHS>...`

###### **Arguments:**

* `<PATHS>` — Paths to untrack. They must already be ignored



## `jj version`

Display version information

**Usage:** `jj version`



## `jj workspace`

Commands for working with workspaces

Workspaces let you add additional working copies attached to the same repo. A common use case is so you can run a slow build or test in one workspace while you're continuing to write code in another workspace.

Each workspace has its own working-copy commit. When you have more than one workspace attached to a repo, they are indicated by `@<workspace name>` in `jj log`.

**Usage:** `jj workspace <COMMAND>`

###### **Subcommands:**

* `add` — Add a workspace
* `forget` — Stop tracking a workspace's working-copy commit in the repo
* `list` — List workspaces
* `root` — Show the current workspace root directory
* `update-stale` — Update a workspace that has become stale



## `jj workspace add`

Add a workspace

**Usage:** `jj workspace add [OPTIONS] <DESTINATION>`

###### **Arguments:**

* `<DESTINATION>` — Where to create the new workspace

###### **Options:**

* `--name <NAME>` — A name for the workspace
* `-r`, `--revision <REVISION>` — A list of parent revisions for the working-copy commit of the newly created workspace. You may specify nothing, or any number of parents



## `jj workspace forget`

Stop tracking a workspace's working-copy commit in the repo

The workspace will not be touched on disk. It can be deleted from disk before or after running this command.

**Usage:** `jj workspace forget [WORKSPACES]...`

###### **Arguments:**

* `<WORKSPACES>` — Names of the workspaces to forget. By default, forgets only the current workspace



## `jj workspace list`

List workspaces

**Usage:** `jj workspace list`



## `jj workspace root`

Show the current workspace root directory

**Usage:** `jj workspace root`



## `jj workspace update-stale`

Update a workspace that has become stale

For information about stale working copies, see https://github.com/martinvonz/jj/blob/main/docs/working-copy.md.

**Usage:** `jj workspace update-stale`



<hr/>

<small><i>
    This document was generated automatically by
    <a href="https://crates.io/crates/clap-markdown"><code>clap-markdown</code></a>.
</i></small>