jj-cli 0.34.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
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
---
source: cli/tests/test_generate_md_cli_help.rs
description: "AUTO-GENERATED FILE, DO NOT EDIT. This cli reference is generated by a test as an `insta` snapshot. MkDocs includes this snapshot from docs/cli-reference.md."
---
<!-- BEGIN MARKDOWN-->

# 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 absorb`↴](#jj-absorb)
* [`jj bisect`↴](#jj-bisect)
* [`jj bisect run`↴](#jj-bisect-run)
* [`jj bookmark`↴](#jj-bookmark)
* [`jj bookmark create`↴](#jj-bookmark-create)
* [`jj bookmark delete`↴](#jj-bookmark-delete)
* [`jj bookmark forget`↴](#jj-bookmark-forget)
* [`jj bookmark list`↴](#jj-bookmark-list)
* [`jj bookmark move`↴](#jj-bookmark-move)
* [`jj bookmark rename`↴](#jj-bookmark-rename)
* [`jj bookmark set`↴](#jj-bookmark-set)
* [`jj bookmark track`↴](#jj-bookmark-track)
* [`jj bookmark untrack`↴](#jj-bookmark-untrack)
* [`jj commit`↴](#jj-commit)
* [`jj config`↴](#jj-config)
* [`jj config edit`↴](#jj-config-edit)
* [`jj config get`↴](#jj-config-get)
* [`jj config list`↴](#jj-config-list)
* [`jj config path`↴](#jj-config-path)
* [`jj config set`↴](#jj-config-set)
* [`jj config unset`↴](#jj-config-unset)
* [`jj describe`↴](#jj-describe)
* [`jj diff`↴](#jj-diff)
* [`jj diffedit`↴](#jj-diffedit)
* [`jj duplicate`↴](#jj-duplicate)
* [`jj edit`↴](#jj-edit)
* [`jj evolog`↴](#jj-evolog)
* [`jj file`↴](#jj-file)
* [`jj file annotate`↴](#jj-file-annotate)
* [`jj file chmod`↴](#jj-file-chmod)
* [`jj file list`↴](#jj-file-list)
* [`jj file show`↴](#jj-file-show)
* [`jj file track`↴](#jj-file-track)
* [`jj file untrack`↴](#jj-file-untrack)
* [`jj fix`↴](#jj-fix)
* [`jj gerrit`↴](#jj-gerrit)
* [`jj gerrit upload`↴](#jj-gerrit-upload)
* [`jj git`↴](#jj-git)
* [`jj git clone`↴](#jj-git-clone)
* [`jj git export`↴](#jj-git-export)
* [`jj git fetch`↴](#jj-git-fetch)
* [`jj git import`↴](#jj-git-import)
* [`jj git init`↴](#jj-git-init)
* [`jj git push`↴](#jj-git-push)
* [`jj git remote`↴](#jj-git-remote)
* [`jj git remote add`↴](#jj-git-remote-add)
* [`jj git remote list`↴](#jj-git-remote-list)
* [`jj git remote remove`↴](#jj-git-remote-remove)
* [`jj git remote rename`↴](#jj-git-remote-rename)
* [`jj git remote set-url`↴](#jj-git-remote-set-url)
* [`jj git root`↴](#jj-git-root)
* [`jj help`↴](#jj-help)
* [`jj interdiff`↴](#jj-interdiff)
* [`jj log`↴](#jj-log)
* [`jj metaedit`↴](#jj-metaedit)
* [`jj new`↴](#jj-new)
* [`jj next`↴](#jj-next)
* [`jj operation`↴](#jj-operation)
* [`jj operation abandon`↴](#jj-operation-abandon)
* [`jj operation diff`↴](#jj-operation-diff)
* [`jj operation log`↴](#jj-operation-log)
* [`jj operation restore`↴](#jj-operation-restore)
* [`jj operation revert`↴](#jj-operation-revert)
* [`jj operation show`↴](#jj-operation-show)
* [`jj parallelize`↴](#jj-parallelize)
* [`jj prev`↴](#jj-prev)
* [`jj rebase`↴](#jj-rebase)
* [`jj redo`↴](#jj-redo)
* [`jj resolve`↴](#jj-resolve)
* [`jj restore`↴](#jj-restore)
* [`jj revert`↴](#jj-revert)
* [`jj root`↴](#jj-root)
* [`jj show`↴](#jj-show)
* [`jj sign`↴](#jj-sign)
* [`jj simplify-parents`↴](#jj-simplify-parents)
* [`jj sparse`↴](#jj-sparse)
* [`jj sparse edit`↴](#jj-sparse-edit)
* [`jj sparse list`↴](#jj-sparse-list)
* [`jj sparse reset`↴](#jj-sparse-reset)
* [`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 undo`↴](#jj-undo)
* [`jj unsign`↴](#jj-unsign)
* [`jj util`↴](#jj-util)
* [`jj util completion`↴](#jj-util-completion)
* [`jj util config-schema`↴](#jj-util-config-schema)
* [`jj util exec`↴](#jj-util-exec)
* [`jj util gc`↴](#jj-util-gc)
* [`jj util install-man-pages`↴](#jj-util-install-man-pages)
* [`jj util markdown-help`↴](#jj-util-markdown-help)
* [`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 rename`↴](#jj-workspace-rename)
* [`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 [`jj help -k tutorial`].

[`jj help -k tutorial`]: https://jj-vcs.github.io/jj/latest/tutorial/

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

'jj help --help' lists available keywords. Use 'jj help -k' to show help for one of these keywords.


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

* `abandon` — Abandon a revision
* `absorb` — Move changes from a revision into the stack of mutable revisions
* `bisect` — Find a bad revision by bisection
* `bookmark` — Manage bookmarks [default alias: b]
* `commit` — Update the description and create a new change on top [default alias: ci]
* `config` — Manage config options
* `describe` — Update the change description or other metadata [default alias: desc]
* `diff` — Compare file contents between two revisions
* `diffedit` — Touch up the content changes in a revision with a diff editor
* `duplicate` — Create new changes with the same content as existing ones
* `edit` — Sets the specified revision as the working-copy revision
* `evolog` — Show how a change has evolved over time
* `file` — File operations
* `fix` — Update files with formatting fixes or other changes
* `gerrit` — Interact with Gerrit Code Review
* `git` — Commands for working with Git remotes and the underlying Git repo
* `help` — Print this message or the help of the given subcommand(s)
* `interdiff` — Compare the changes of two commits
* `log` — Show revision history
* `metaedit` — Modify the metadata of a revision without changing its content
* `new` — Create a new, empty change and (by default) edit it in the working copy
* `next` — Move the working-copy commit to the child revision
* `operation` — Commands for working with the operation log
* `parallelize` — Parallelize revisions by making them siblings
* `prev` — Change the working copy revision relative to the parent revision
* `rebase` — Move revisions to different parent(s)
* `redo` — Redo the most recently undone operation
* `resolve` — Resolve conflicted files with an external merge tool
* `restore` — Restore paths from another revision
* `revert` — Apply the reverse of the given revision(s)
* `root` — Show the current workspace root directory (shortcut for `jj workspace root`)
* `show` — Show commit description and changes in a revision
* `sign` — Cryptographically sign a revision
* `simplify-parents` — Simplify parent edges for the specified revision(s)
* `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 another revision
* `status` — Show high-level repo status [default alias: st]
* `tag` — Manage tags
* `undo` — Undo the last operation
* `unsign` — Drop a cryptographic signature
* `util` — Infrequently used commands such as for generating shell completions
* `version` — Display version information
* `workspace` — Commands for working with workspaces

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

* `-R`, `--repository <REPOSITORY>` — Path to repository to operate on

   By default, Jujutsu searches for the closest .jj/ directory in an ancestor of the current working directory.
* `--ignore-working-copy` — Don't snapshot the working copy, and don't update it

   By default, Jujutsu snapshots the working copy at the beginning of every command. The working copy is also updated at the end of the command, if the command modified the working-copy commit (`@`). If you want to avoid snapshotting the working copy and instead see a possibly stale working-copy commit, you can use `--ignore-working-copy`. This may be useful e.g. in a command prompt, especially if you have another process that commits the working copy.

   Loading the repository at a specific operation with `--at-operation` implies `--ignore-working-copy`.
* `--ignore-immutable` — Allow rewriting immutable commits

   By default, Jujutsu prevents rewriting commits in the configured set of immutable commits. This option disables that check and lets you rewrite any commit but the root commit.

   This option only affects the check. It does not affect the `immutable_heads()` revset or the `immutable` template keyword.
* `--at-operation <AT_OPERATION>` [alias: `at-op`] — Operation to load the repo at

   Operation to load the repo at. By default, Jujutsu loads the repo at the most recent operation, or at the merge of the divergent operations if any.

   You can use `--at-op=<operation ID>` to see what the repo looked like at an earlier operation. For example `jj --at-op=<operation ID> st` will show you what `jj st` would have shown you when the given operation had just finished. `--at-op=@` is pretty much the same as the default except that divergent operations will never be merged.

   Use `jj op log` to find the operation ID you want. Any unambiguous prefix of the operation ID is enough.

   When loading the repo at an earlier operation, the working copy will be ignored, as if `--ignore-working-copy` had been specified.

   It is possible to run mutating commands when loading the repo at an earlier operation. Doing that is equivalent to having run concurrent commands starting at the earlier operation. There's rarely a reason to do that, but it is possible.
* `--debug` — Enable debug logging
* `--color <WHEN>` — When to colorize output

  Possible values: `always`, `never`, `debug`, `auto`

* `--quiet` — Silence non-primary command output

   For example, `jj file list` will still list files, but it won't tell you if the working copy was snapshotted or if descendants were rebased.

   Warnings and errors will still be printed.
* `--no-pager` — Disable the pager
* `--config <NAME=VALUE>` — Additional configuration options (can be repeated)

   The name should be specified as TOML dotted keys. The value should be specified as a TOML expression. If string value isn't enclosed by any TOML constructs (such as array notation), quotes can be omitted.
* `--config-file <PATH>` — Additional configuration files (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.

If a working-copy commit gets abandoned, it will be given a new, empty commit. This is true in general; it is not specific to this command.

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

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

* `<REVSETS>` — The revision(s) to abandon (default: @)

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

* `--retain-bookmarks` — Do not delete bookmarks pointing to the revisions to abandon

   Bookmarks will be moved to the parent revisions instead.
* `--restore-descendants` — Do not modify the content of the children of the abandoned commits



## `jj absorb`

Move changes from a revision into the stack of mutable revisions

This command splits changes in the source revision and moves each change to the closest mutable ancestor where the corresponding lines were modified last. If the destination revision cannot be determined unambiguously, the change will be left in the source revision.

The source revision will be abandoned if all changes are absorbed into the destination revisions, and if the source revision has no description.

The modification made by `jj absorb` can be reviewed by `jj op show -p`.

**Usage:** `jj absorb [OPTIONS] [FILESETS]...`

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

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

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

* `-f`, `--from <REVSET>` — Source revision to absorb from

  Default value: `@`
* `-t`, `--into <REVSETS>` [alias: `to`] — Destination revisions to absorb into

   Only ancestors of the source revision will be considered.

  Default value: `mutable()`



## `jj bisect`

Find a bad revision by bisection

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

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

* `run` — Run a given command to find the first bad revision



## `jj bisect run`

Run a given command to find the first bad revision.

Uses binary search to find the first bad revision. Revisions are evaluated by running a given command (see the documentation for `--command` for details).

It is assumed that if a given revision is bad, then all its descendants in the input range are also bad.

The target of the bisection can be inverted to look for the first good revision by passing `--find-good`.

Hint: You can pass your shell as evaluation command. You can then run manual tests in the shell and make sure to exit the shell with appropriate error code depending on the outcome (e.g. `exit 0` to mark the revision as good in Bash or Fish).

**Usage:** `jj bisect run [OPTIONS] --range <REVSETS> --command <COMMAND>`

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

* `-r`, `--range <REVSETS>` — Range of revisions to bisect

   This is typically a range like `v1.0..main`. The heads of the range are assumed to be bad. Ancestors of the range that are not also in the range are assumed to be good.
* `--command <COMMAND>` — Command to run to determine whether the bug is present

   The command will be run from the workspace root. The exit status of the command will be used to mark revisions as good or bad: status 0 means good, 125 means to skip the revision, 127 (command not found) will abort the bisection, and any other non-zero exit status means the revision is bad.

   The target's commit ID is available to the command in the `$JJ_BISECT_TARGET` environment variable.
* `--find-good` — Whether to find the first good revision instead

   Inverts the interpretation of exit statuses (excluding special exit statuses).

  Default value: `false`



## `jj bookmark`

Manage bookmarks [default alias: b]

See [`jj help -k bookmarks`] for more information.

[`jj help -k bookmarks`]: https://jj-vcs.github.io/jj/latest/bookmarks

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

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

* `create` — Create a new bookmark
* `delete` — Delete an existing bookmark and propagate the deletion to remotes on the next push
* `forget` — Forget a bookmark without marking it as a deletion to be pushed
* `list` — List bookmarks and their targets
* `move` — Move existing bookmarks to target revision
* `rename` — Rename `old` bookmark name to `new` bookmark name
* `set` — Create or update a bookmark to point to a certain commit
* `track` — Start tracking given remote bookmarks
* `untrack` — Stop tracking given remote bookmarks



## `jj bookmark create`

Create a new bookmark

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

**Command Alias:** `c`

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

* `<NAMES>` — The bookmarks to create

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

* `-r`, `--revision <REVSET>` [alias: `to`] — The bookmark's target revision

  Default value: `@`



## `jj bookmark delete`

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

Revisions referred to by the deleted bookmarks are not abandoned. To delete revisions as well as bookmarks, use `jj abandon`. For example, `jj abandon main..<bookmark>` will abandon revisions belonging to the `<bookmark>` branch (relative to the `main` branch.)

If you don't want the deletion of the local bookmark to propagate to any tracked remote bookmarks, use `jj bookmark forget` instead.

**Usage:** `jj bookmark delete <NAMES>...`

**Command Alias:** `d`

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

* `<NAMES>` — The bookmarks to delete

   By default, the specified name matches exactly. Use `glob:` prefix to select bookmarks by [wildcard pattern].

   [wildcard pattern]: https://jj-vcs.github.io/jj/latest/revsets/#string-patterns



## `jj bookmark forget`

Forget a bookmark without marking it as a deletion to be pushed

If a local bookmark is forgotten, any corresponding remote bookmarks will become untracked to ensure that the forgotten bookmark will not impact remotes on future pushes.

**Usage:** `jj bookmark forget [OPTIONS] <NAMES>...`

**Command Alias:** `f`

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

* `<NAMES>` — The bookmarks to forget

   By default, the specified name matches exactly. Use `glob:` prefix to select bookmarks by [wildcard pattern].

   [wildcard pattern]: https://jj-vcs.github.io/jj/latest/revsets/#string-patterns

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

* `--include-remotes` — When forgetting a local bookmark, also forget any corresponding remote bookmarks

   A forgotten remote bookmark will not impact remotes on future pushes. It will be recreated on future fetches if it still exists on the remote. If there is a corresponding Git-tracking remote bookmark, it will also be forgotten.



## `jj bookmark list`

List bookmarks and their targets

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

See [`jj help -k bookmarks`] for more information.

[`jj help -k bookmarks`]: https://jj-vcs.github.io/jj/latest/bookmarks

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

**Command Alias:** `l`

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

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

   By default, the specified name matches exactly. Use `glob:` prefix to select bookmarks by [wildcard pattern].

   [wildcard pattern]: https://jj-vcs.github.io/jj/latest/revsets/#string-patterns

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

* `-a`, `--all-remotes` — Show all tracking and non-tracking remote bookmarks including the ones whose targets are synchronized with the local bookmarks
* `--remote <REMOTE>` — Show all tracking and non-tracking remote bookmarks belonging to this remote

   Can be combined with `--tracked` or `--conflicted` to filter the bookmarks shown (can be repeated.)

   By default, the specified remote name matches exactly. Use `glob:` prefix to select remotes by [wildcard pattern].

   [wildcard pattern]: https://jj-vcs.github.io/jj/latest/revsets/#string-patterns
* `-t`, `--tracked` — Show remote tracked bookmarks only. Omits local Git-tracking bookmarks by default
* `-c`, `--conflicted` — Show conflicted bookmarks only
* `-r`, `--revisions <REVSETS>` — Show bookmarks whose local targets are in the given revisions

   Note that `-r deleted_bookmark` will not work since `deleted_bookmark` wouldn't have a local target.
* `-T`, `--template <TEMPLATE>` — Render each bookmark using the given template

   All 0-argument methods of the [`CommitRef` type] are available as keywords in the template expression. See [`jj help -k templates`] for more information.

   [`CommitRef` type]: https://jj-vcs.github.io/jj/latest/templates/#commitref-type

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/
* `--sort <SORT_KEY>` — Sort bookmarks based on the given key (or multiple keys)

   Suffix the key with `-` to sort in descending order of the value (e.g. `--sort name-`). Note that when using multiple keys, the first key is the most significant.

   This defaults to the `ui.bookmark-list-sort-keys` setting.

  Possible values: `name`, `name-`, `author-name`, `author-name-`, `author-email`, `author-email-`, `author-date`, `author-date-`, `committer-name`, `committer-name-`, `committer-email`, `committer-email-`, `committer-date`, `committer-date-`




## `jj bookmark move`

Move existing bookmarks to target revision

If bookmark names are given, the specified bookmarks will be updated to point to the target revision.

If `--from` options are given, bookmarks currently pointing to the specified revisions will be updated. The bookmarks can also be filtered by names.

Example: pull up the nearest bookmarks to the working-copy parent

$ jj bookmark move --from 'heads(::@- & bookmarks())' --to @-

**Usage:** `jj bookmark move [OPTIONS] <NAMES|--from <REVSETS>>`

**Command Alias:** `m`

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

* `<NAMES>` — Move bookmarks matching the given name patterns

   By default, the specified name matches exactly. Use `glob:` prefix to select bookmarks by [wildcard pattern].

   [wildcard pattern]: https://jj-vcs.github.io/jj/latest/revsets/#string-patterns

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

* `-f`, `--from <REVSETS>` — Move bookmarks from the given revisions
* `-t`, `--to <REVSET>` — Move bookmarks to this revision

  Default value: `@`
* `-B`, `--allow-backwards` — Allow moving bookmarks backwards or sideways



## `jj bookmark rename`

Rename `old` bookmark name to `new` bookmark name

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

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

**Command Alias:** `r`

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

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



## `jj bookmark set`

Create or update a bookmark to point to a certain commit

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

**Command Alias:** `s`

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

* `<NAMES>` — The bookmarks to update

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

* `-r`, `--revision <REVSET>` [alias: `to`] — The bookmark's target revision

  Default value: `@`
* `-B`, `--allow-backwards` — Allow moving the bookmark backwards or sideways



## `jj bookmark track`

Start tracking given remote bookmarks

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

**Usage:** `jj bookmark track <BOOKMARK@REMOTE>...`

**Command Alias:** `t`

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

* `<BOOKMARK@REMOTE>` — Remote bookmarks to track

   By default, the specified name matches exactly. Use `glob:` prefix to select bookmarks by [wildcard pattern].

   Examples: bookmark@remote, glob:main@*, glob:jjfan-*@upstream

   [wildcard pattern]: https://jj-vcs.github.io/jj/latest/revsets/#string-patterns



## `jj bookmark untrack`

Stop tracking given remote bookmarks

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

If you want to forget a local bookmark while also untracking the corresponding remote bookmarks, use `jj bookmark forget` instead.

**Usage:** `jj bookmark untrack <BOOKMARK@REMOTE>...`

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

* `<BOOKMARK@REMOTE>` — Remote bookmarks to untrack

   By default, the specified name matches exactly. Use `glob:` prefix to select bookmarks by [wildcard pattern].

   Examples: bookmark@remote, glob:main@*, glob:jjfan-*@upstream

   [wildcard pattern]: https://jj-vcs.github.io/jj/latest/revsets/#string-patterns



## `jj commit`

Update the description and create a new change on top [default alias: ci]

When called without path arguments or `--interactive`, `jj commit` is equivalent to `jj describe` followed by `jj new`.

Otherwise, this command is very similar to `jj split`. Differences include:

* `jj commit` is not interactive by default (it selects all changes).

* `jj commit` doesn't have a `-r` option. It always acts on the working-copy commit (@).

* `jj split` (without `-d/-A/-B`) will move bookmarks forward from the old change to the child change. `jj commit` doesn't move bookmarks forward.

* `jj split` allows you to move the selected changes to a different destination with `-d/-A/-B`.

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

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

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

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

* `-i`, `--interactive` — Interactively choose which changes to include in the first commit
* `--tool <NAME>` — Specify diff editor to be used (implies --interactive)
* `-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.

See [`jj help -k config`] to know more about file locations, supported config options, and other details about `jj config`.

[`jj help -k config`]: https://jj-vcs.github.io/jj/latest/config/

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

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

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



## `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>`

**Command Alias:** `e`

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

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



## `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>`

**Command Alias:** `g`

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

* `<NAME>`



## `jj config list`

List variables set in config files, along with their values

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

**Command Alias:** `l`

###### **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
* `--include-overridden` — Allow printing overridden values
* `--user` — Target the user-level config
* `--repo` — Target the repo-level config
* `-T`, `--template <TEMPLATE>` — Render each variable using the given template

   The following keywords are available in the template expression:

   * `name: String`: Config name.
   * `value: ConfigValue`: Value to be formatted in TOML syntax.
   * `overridden: Boolean`: True if the value is shadowed by other.
   * `source: String`: Source of the value.
   * `path: String`: Path to the config file.

   Can be overridden by the `templates.config_list` setting. To
   see a detailed config list, use the `builtin_config_list_detailed`
   template.

   See [`jj help -k templates`] for more information.

   [`jj help -k templates`]:
       https://jj-vcs.github.io/jj/latest/templates/



## `jj config path`

Print the paths to the config files

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

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

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

**Command Alias:** `p`

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

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



## `jj config set`

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

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

**Command Alias:** `s`

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

* `<NAME>`
* `<VALUE>` — New value to set

   The value should be specified as a TOML expression. If string value isn't enclosed by any TOML constructs (such as apostrophes or array notation), quotes can be omitted. Note that the value may also need shell quoting. TOML multi-line strings can be useful if the value contains apostrophes. For example, to set `foo.bar` to the string "{don't}" use `jj config set --user foo.bar "'''{don't}'''"`. This is valid in both Bash and Fish.

   Alternative, e.g. to avoid dealing with shell quoting, use `jj config edit` to edit the TOML file directly.

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

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



## `jj config unset`

Update a config file to unset the given option

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

**Command Alias:** `u`

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

* `<NAME>`

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

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



## `jj describe`

Update the change description or other metadata [default alias: desc]

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

**Usage:** `jj describe [OPTIONS] [REVSETS]...`

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

* `<REVSETS>` — The revision(s) whose description to edit (default: @)

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

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

   If multiple revisions are specified, the same description will be used for all of them.
* `--stdin` — Read the change description from stdin

   If multiple revisions are specified, the same description will be used for all of them.
* `--edit` — Open an editor

   Forces an editor to open when using `--stdin` or `--message` to allow the message to be edited afterwards.



## `jj diff`

Compare file contents between two revisions

With the `-r` option, shows the changes compared to the parent revision. If there are several parent revisions (i.e., the given revision is a merge), then they will be merged and the changes from the result to the given revision will be shown.

With the `--from` and/or `--to` options, shows the difference from/to the given revisions. If either is left out, it defaults to the working-copy commit. For example, `jj diff --from main` shows the changes from "main" (perhaps a bookmark name) to the working-copy commit.

If no option is specified, it defaults to `-r @`.

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

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

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

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

* `-r`, `--revisions <REVSETS>` — Show changes in these revisions

   If there are multiple revisions, then the total diff for all of them will be shown. For example, if you have a linear chain of revisions A..D, then `jj diff -r B::D` equals `jj diff --from A --to D`. Multiple heads and/or roots are supported, but gaps in the revset are not supported (e.g. `jj diff -r 'A|C'` in a linear chain A..C).

   If a revision is a merge commit, this shows changes *from* the automatic merge of the contents of all of its parents *to* the contents of the revision itself.

   If none of `-r`, `-f`, or `-t` is provided, then the default is `-r @`.
* `-f`, `--from <REVSET>` — Show changes from this revision

   If none of `-r`, `-f`, or `-t` is provided, then the default is `-r @`.
* `-t`, `--to <REVSET>` — Show changes to this revision

   If none of `-r`, `-f`, or `-t` is provided, then the default is `-r @`.
* `-T`, `--template <TEMPLATE>` — Render each file diff entry using the given template

   All 0-argument methods of the [`TreeDiffEntry` type] are available as keywords in the template expression. See [`jj help -k templates`] for more information.

   [`TreeDiffEntry` type]: https://jj-vcs.github.io/jj/latest/templates/#treediffentry-type

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted
* `--stat` — Show a histogram of the changes
* `--types` — For each path, show only its type before and after

   The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule.
* `--name-only` — For each path, show only its path

   Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g`
* `--git` — Show a Git-format diff
* `--color-words` — Show a word-level diff with changes indicated only by color
* `--tool <TOOL>` — Generate diff by external command

   A builtin format can also be specified as `:<name>`. For example, `--tool=:git` is equivalent to `--git`.
* `--context <CONTEXT>` — Number of lines of context to show
* `-w`, `--ignore-all-space` — Ignore whitespace when comparing lines
* `-b`, `--ignore-space-change` — Ignore changes in amount of whitespace when comparing lines



## `jj diffedit`

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

With the `-r` option, starts a [diff editor] 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.

[diff editor]: https://jj-vcs.github.io/jj/latest/config/#editing-diffs

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. Unless `--restore-descendants` is used, 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. For moving changes between revisions, see `jj squash -i`.

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

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

* `<FILESETS>` — Edit only these paths (unmatched paths will remain unchanged)

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

* `-r`, `--revision <REVSET>` — The revision to touch up

   Defaults to @ if neither --to nor --from are specified.
* `-f`, `--from <REVSET>` — Show changes from this revision

   Defaults to @ if --to is specified.
* `-t`, `--to <REVSET>` — Edit changes in this revision

   Defaults to @ if --from is specified.
* `--tool <NAME>` — Specify diff editor to be used
* `--restore-descendants` — Preserve the content (not the diff) when rebasing descendants

   When rebasing a descendant on top of the rewritten revision, its diff compared to its parent(s) is normally preserved, i.e. the same way that descendants are always rebased. This flag makes it so the content/state is preserved instead of preserving the diff.



## `jj duplicate`

Create new changes with the same content as existing ones

When none of the `--destination`, `--insert-after`, or `--insert-before` arguments are provided, commits will be duplicated onto their existing parents or onto other newly duplicated commits.

When any of the `--destination`, `--insert-after`, or `--insert-before` arguments are provided, the roots of the specified commits will be duplicated onto the destination indicated by the arguments. Other specified commits will be duplicated onto these newly duplicated commits. If the `--insert-after` or `--insert-before` arguments are provided, the new children indicated by the arguments will be rebased onto the heads of the specified commits.

By default, the duplicated commits retain the descriptions of the originals. This can be customized with the `templates.duplicate_description` setting.

**Usage:** `jj duplicate [OPTIONS] [REVSETS]...`

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

* `<REVSETS>` — The revision(s) to duplicate (default: @)

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

* `-d`, `--destination <REVSETS>` — The revision(s) to duplicate onto (can be repeated to create a merge commit)
* `-A`, `--insert-after <REVSETS>` [alias: `after`] — The revision(s) to insert after (can be repeated to create a merge commit)
* `-B`, `--insert-before <REVSETS>` [alias: `before`] — The revision(s) to insert before (can be repeated to create a merge commit)



## `jj edit`

Sets the specified revision as the working-copy revision

Note: it is [generally recommended] to instead use `jj new` and `jj squash`.

[generally recommended]: https://jj-vcs.github.io/jj/latest/FAQ#how-do-i-resume-working-on-an-existing-change

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

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

* `<REVSET>` — The commit to edit



## `jj evolog`

Show how a change has evolved over time

Lists the previous commits which a change has pointed to. The current commit of a change evolves when the change is updated, rebased, etc.

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

**Command Alias:** `evolution-log`

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

* `-r`, `--revisions <REVSETS>` — Follow changes from these revisions

  Default value: `@`
* `-n`, `--limit <LIMIT>` — Limit number of revisions to show

   Applied after revisions are reordered topologically, but before being reversed.
* `--reversed` — Show revisions in the opposite order (older revisions first)
* `--no-graph` — Don't show the graph, show a flat list of revisions
* `-T`, `--template <TEMPLATE>` — Render each revision using the given template

   All 0-argument methods of the [`CommitEvolutionEntry` type] are available as keywords in the template expression. See [`jj help -k templates`] for more information.

   If not specified, this defaults to the `templates.evolog` setting.

   [`CommitEvolutionEntry` type]: https://jj-vcs.github.io/jj/latest/templates/#commitevolutionentry-type

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/
* `-p`, `--patch` — Show patch compared to the previous version of this change

   If the previous version has different parents, it will be temporarily rebased to the parents of the new version, so the diff is not contaminated by unrelated changes.
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted
* `--stat` — Show a histogram of the changes
* `--types` — For each path, show only its type before and after

   The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule.
* `--name-only` — For each path, show only its path

   Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g`
* `--git` — Show a Git-format diff
* `--color-words` — Show a word-level diff with changes indicated only by color
* `--tool <TOOL>` — Generate diff by external command

   A builtin format can also be specified as `:<name>`. For example, `--tool=:git` is equivalent to `--git`.
* `--context <CONTEXT>` — Number of lines of context to show
* `--ignore-all-space` — Ignore whitespace when comparing lines
* `--ignore-space-change` — Ignore changes in amount of whitespace when comparing lines



## `jj file`

File operations

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

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

* `annotate` — Show the source change for each line of the target file
* `chmod` — Sets or removes the executable bit for paths in the repo
* `list` — List files in a revision
* `show` — Print contents of files in a revision
* `track` — Start tracking specified paths in the working copy
* `untrack` — Stop tracking specified paths in the working copy



## `jj file annotate`

Show the source change for each line of the target file.

Annotates a revision line by line. Each line includes the source change that introduced the associated line. A path to the desired file must be provided.

**Usage:** `jj file annotate [OPTIONS] <PATH>`

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

* `<PATH>` — the file to annotate

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

* `-r`, `--revision <REVSET>` — an optional revision to start at
* `-T`, `--template <TEMPLATE>` — Render each line using the given template

   All 0-argument methods of the [`AnnotationLine` type] are available as keywords in the template expression. See [`jj help -k templates`] for more information.

   If not specified, this defaults to the `templates.file_annotate` setting.

   [`AnnotationLine` type]: https://jj-vcs.github.io/jj/latest/templates/#annotationline-type

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/



## `jj file chmod`

Sets or removes the executable bit for paths in the repo

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

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

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

* `<MODE>`

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

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

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

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

  Default value: `@`



## `jj file list`

List files in a revision

**Usage:** `jj file list [OPTIONS] [FILESETS]...`

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

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

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

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

  Default value: `@`
* `-T`, `--template <TEMPLATE>` — Render each file entry using the given template

   All 0-argument methods of the [`TreeEntry` type] are available as keywords in the template expression. See [`jj help -k templates`] for more information.

   [`TreeEntry` type]: https://jj-vcs.github.io/jj/latest/templates/#treeentry-type

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/



## `jj file show`

Print contents of files in a revision

If the given path is a directory, files in the directory will be visited recursively.

**Usage:** `jj file show [OPTIONS] <FILESETS>...`

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

* `<FILESETS>` — Paths to print

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

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

  Default value: `@`
* `-T`, `--template <TEMPLATE>` — Render each file metadata using the given template

   All 0-argument methods of the [`TreeEntry` type] are available as keywords in the template expression. See [`jj help -k templates`] for more information.

   If not specified, this defaults to the `templates.file_show` setting.

   [`TreeEntry` type]: https://jj-vcs.github.io/jj/latest/templates/#treeentry-type

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/



## `jj file track`

Start tracking specified paths in the working copy

Without arguments, all paths that are not ignored will be tracked.

By default, new files in the working copy are automatically tracked, so this command has no effect. You can configure which paths to automatically track by setting `snapshot.auto-track` (e.g. to `"none()"` or `"glob:**/*.rs"`). Files that don't match the pattern can be manually tracked using this command. The default pattern is `all()`.

**Usage:** `jj file track <FILESETS>...`

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

* `<FILESETS>` — Paths to track



## `jj file untrack`

Stop tracking specified paths in the working copy

**Usage:** `jj file untrack <FILESETS>...`

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

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

   The paths could be ignored via a .gitignore or .git/info/exclude (in colocated repos).



## `jj fix`

Update files with formatting fixes or other changes

The primary use case for this command is to apply the results of automatic
code formatting tools to revisions that may not be properly formatted yet.
It can also be used to modify files with other tools like `sed` or `sort`.

The changed files in the given revisions will be updated with any fixes
determined by passing their file content through any external tools the user
has configured for those files. Descendants will also be updated by passing
their versions of the same files through the same tools, which will ensure
that the fixes are not lost. This will never result in new conflicts. Files
with existing conflicts will be updated on all sides of the conflict, which
can potentially increase or decrease the number of conflict markers.

The external tools must accept the current file content on standard input,
and return the updated file content on standard output. A tool's output will
not be used unless it exits with a successful exit code. Output on standard
error will be passed through to the terminal.

Tools are defined in a table where the keys are arbitrary identifiers and
the values have the following properties:
 - `command`: The arguments used to run the tool. The first argument is the
   path to an executable file. Arguments can contain these variables that
   will be replaced:
     - `$root` will be replaced with the workspace root path (the directory
       containing the .jj directory).
     - `$path` will be replaced with the repo-relative path of the file
       being fixed. It is useful to provide the path to tools that include
       the path in error messages, or behave differently based on the
       directory or file name.
 - `patterns`: Determines which files the tool will affect. If this list is
   empty, no files will be affected by the tool. If there are multiple
   patterns, the tool is applied only once to each file in the union of the
   patterns.
 - `enabled`: Enables or disables the tool. If omitted, the tool is enabled.
   This is useful for defining disabled tools in user configuration that can
   be enabled in individual repositories with one config setting.

For example, the following configuration defines how two code formatters
(`clang-format` and `black`) will apply to three different file extensions
(`.cc`, `.h`, and `.py`):

```toml
[fix.tools.clang-format]
command = ["/usr/bin/clang-format", "--assume-filename=$path"]
patterns = ["glob:'**/*.cc'",
            "glob:'**/*.h'"]

[fix.tools.black]
command = ["/usr/bin/black", "-", "--stdin-filename=$path"]
patterns = ["glob:'**/*.py'"]
```

Execution order of tools that affect the same file is deterministic, but
currently unspecified, and may change between releases. If two tools affect
the same file, the second tool to run will receive its input from the
output of the first tool.

**Usage:** `jj fix [OPTIONS] [FILESETS]...`

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

* `<FILESETS>` — Fix only these paths

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

* `-s`, `--source <REVSETS>` — Fix files in the specified revision(s) and their descendants. If no revisions are specified, this defaults to the `revsets.fix` setting, or `reachable(@, mutable())` if it is not set
* `--include-unchanged-files` — Fix unchanged files in addition to changed ones. If no paths are specified, all files in the repo will be fixed



## `jj gerrit`

Interact with Gerrit Code Review

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

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

* `upload` — Upload changes to Gerrit for code review, or update existing changes



## `jj gerrit upload`

Upload changes to Gerrit for code review, or update existing changes.

Uploading in a set of revisions to Gerrit creates a single "change" for each revision included in the revset. These changes are then available for review on your Gerrit instance.

Note: The gerrit commit Id may not match that of your local commit Id, since we add a `Change-Id` footer to the commit message if one does not already exist. This ID is based off the jj Change-Id, but is not the same.

If a change already exists for a given revision (i.e. it contains the same `Change-Id`), this command will update the contents of the existing change to match.

Note: this command takes 1-or-more revsets arguments, each of which can resolve to multiple revisions; so you may post trees or ranges of commits to Gerrit for review all at once.

**Usage:** `jj gerrit upload [OPTIONS]`

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

* `-r`, `--revisions <REVISIONS>` — The revset, selecting which revisions are sent in to Gerrit

   This can be any arbitrary set of commits. Note that when you push a commit at the head of a stack, all ancestors are pushed too. This means that `jj gerrit upload -r foo` is equivalent to `jj gerrit upload -r 'mutable()::foo`.
* `-b`, `--remote-branch <REMOTE_BRANCH>` — The location where your changes are intended to land

   This should be a branch on the remote. Can be configured with the `gerrit.default-branch` repository option.
* `--remote <REMOTE>` — The Gerrit remote to push to

   Can be configured with the `gerrit.default-remote` repository option as well. This is typically a full SSH URL for your Gerrit instance.
* `-n`, `--dry-run` — Do not actually push the changes to Gerrit



## `jj git`

Commands for working with Git remotes and the underlying Git repo

See this [comparison], including a [table of commands].

[comparison]: https://jj-vcs.github.io/jj/latest/git-comparison/.

[table of commands]: https://jj-vcs.github.io/jj/latest/git-command-table

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

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

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



## `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

   Local path will be resolved to absolute form.
* `<DESTINATION>` — Specifies the target directory for the Jujutsu repository clone. If not provided, defaults to a directory named after the last component of the source URL. The full directory path will be created if it doesn't exist

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

* `--remote <REMOTE_NAME>` — Name of the newly created remote

  Default value: `origin`
* `--colocate` — Whether or not to colocate the Jujutsu repo with the git repo
* `--no-colocate` — Disable colocation of the Jujutsu repo with the git repo
* `--depth <DEPTH>` — Create a shallow clone of the given depth
* `--fetch-tags <FETCH_TAGS>` — Configure when to fetch tags

   Unless otherwise specified, the initial clone will fetch all tags, while all subsequent fetches will only fetch included tags.

  Possible values:
  - `all`:
    Always fetch all tags
  - `included`:
    Only fetch tags that point to objects that are already being transmitted
  - `none`:
    Do not fetch any tags




## `jj git export`

Update the underlying Git repo with changes made in the repo

**Usage:** `jj git export`



## `jj git fetch`

Fetch from a Git remote

If a working-copy commit gets abandoned, it will be given a new, empty commit. This is true in general; it is not specific to this command.

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

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

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

   By default, the specified name matches exactly. Use `glob:` prefix to expand `*` as a glob, e.g. `--branch 'glob:push-*'`. Other wildcard characters such as `?` are *not* supported. Can be repeated to specify multiple branches.
* `--tracked` — Fetch only tracked bookmarks

   This fetches only bookmarks that are already tracked from the specified remote(s).
* `--remote <REMOTE>` — The remote to fetch from (only named remotes are supported, can be repeated)

   This defaults to the `git.fetch` setting. If that is not configured, and if there are multiple remotes, the remote named "origin" will be used.

   By default, the specified remote names matches exactly. Use a [string pattern], e.g. `--remote 'glob:*'`, to select remotes using patterns.

   [string pattern]: https://jj-vcs.github.io/jj/latest/revsets#string-patterns
* `--all-remotes` — Fetch from all remotes



## `jj git import`

Update repo with changes made in the underlying Git repo

If a working-copy commit gets abandoned, it will be given a new, empty commit. This is true in general; it is not specific to this command.

**Usage:** `jj git import`



## `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 given, the current directory is used.

   By default the `git` repo is under `$destination/.jj`

  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.

   This is done by placing the backing git repo into a `.git` directory in the root of the `jj` repo along with the `.jj` directory. If the `.git` directory already exists, all the existing commits will be imported.

   This option is mutually exclusive with `--git-repo`.
* `--no-colocate` — Disable colocation of the Jujutsu repo with the git repo
* `--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.

   If the specified `--git-repo` path happens to be the same as the `jj` repo path (both .jj and .git directories are in the same working directory), then both `jj` and `git` commands will work on the same repo. This is called a colocated repo.

   This option is mutually exclusive with `--colocate`.



## `jj git push`

Push to a Git remote

By default, pushes tracking bookmarks pointing to `remote_bookmarks(remote=<remote>)..@`. Use `--bookmark` to push specific bookmarks. Use `--all` to push all bookmarks. Use `--change` to generate bookmark names based on the change IDs of specific commits.

Unlike in Git, the remote to push to is not derived from the tracked remote bookmarks. Use `--remote` to select the remote Git repository by name. There is no option to push to multiple remotes.

Before the command actually moves, creates, or deletes a remote bookmark, it makes several [safety checks]. If there is a problem, you may need to run `jj git fetch --remote <remote name>` and/or resolve some [bookmark conflicts].

[safety checks]: https://jj-vcs.github.io/jj/latest/bookmarks/#pushing-bookmarks-safety-checks

[bookmark conflicts]: https://jj-vcs.github.io/jj/latest/bookmarks/#conflicts

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

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

* `--remote <REMOTE>` — The remote to push to (only named remotes are supported)

   This defaults to the `git.push` setting. If that is not configured, and if there are multiple remotes, the remote named "origin" will be used.
* `-b`, `--bookmark <BOOKMARK>` — Push only this bookmark, or bookmarks matching a pattern (can be repeated)

   By default, the specified name matches exactly. Use `glob:` prefix to select bookmarks by [wildcard pattern].

   [wildcard pattern]: https://jj-vcs.github.io/jj/latest/revsets#string-patterns
* `--all` — Push all bookmarks (including new bookmarks)
* `--tracked` — Push all tracked bookmarks

   This usually means that the bookmark was already pushed to or fetched from the [relevant remote].

   [relevant remote]: https://jj-vcs.github.io/jj/latest/bookmarks#remotes-and-tracked-bookmarks
* `--deleted` — Push all deleted bookmarks

   Only tracked bookmarks can be successfully deleted on the remote. A warning will be printed if any untracked bookmarks on the remote correspond to missing local bookmarks.
* `-N`, `--allow-new` — Allow pushing new bookmarks

   Newly-created remote bookmarks will be tracked automatically.

   This can also be turned on by the `git.push-new-bookmarks` setting. If it's set to `true`, `--allow-new` is no-op.
* `--allow-empty-description` — Allow pushing commits with empty descriptions
* `--allow-private` — Allow pushing commits that are private

   The set of private commits can be configured by the `git.private-commits` setting. The default is `none()`, meaning all commits are eligible to be pushed.
* `-r`, `--revisions <REVSETS>` — Push bookmarks pointing to these commits (can be repeated)
* `-c`, `--change <REVSETS>` — Push this commit by creating a bookmark (can be repeated)

   The created bookmark will be tracked automatically. Use the `templates.git_push_bookmark` setting to customize the generated bookmark name. The default is `"push-" ++ change_id.short()`.
* `--named <NAME=REVISION>` — Specify a new bookmark name and a revision to push under that name, e.g. '--named myfeature=@'

   Does not require --allow-new.
* `--dry-run` — Only display what will change on the remote



## `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
* `list` — List Git remotes
* `remove` — Remove a Git remote and forget its bookmarks
* `rename` — Rename a Git remote
* `set-url` — Set the URL of a Git remote



## `jj git remote add`

Add a Git remote

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

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

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

   Local path will be resolved to absolute form.

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

* `--fetch-tags <FETCH_TAGS>` — Configure when to fetch tags

  Default value: `included`

  Possible values:
  - `all`:
    Always fetch all tags
  - `included`:
    Only fetch tags that point to objects that are already being transmitted
  - `none`:
    Do not fetch any tags




## `jj git remote list`

List Git remotes

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



## `jj git remote remove`

Remove a Git remote and forget its bookmarks

**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 set-url`

Set the URL of a Git remote

**Usage:** `jj git remote set-url <REMOTE> <URL>`

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

* `<REMOTE>` — The remote's name
* `<URL>` — The desired URL or path for `remote`

   Local path will be resolved to absolute form.



## `jj git root`

Show the underlying Git directory of a repository using the Git backend

**Usage:** `jj git root`



## `jj help`

Print this message or the help of the given subcommand(s)

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

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

* `<COMMAND>` — Print help for the subcommand(s)

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

* `-k`, `--keyword <KEYWORD>` — Show help for keywords instead of commands

  Possible values:
  - `bookmarks`:
    Named pointers to revisions (similar to Git's branches)
  - `config`:
    How and where to set configuration options
  - `filesets`:
    A functional language for selecting a set of files
  - `glossary`:
    Definitions of various terms
  - `revsets`:
    A functional language for selecting a set of revision
  - `templates`:
    A functional language to customize command output
  - `tutorial`:
    Show a tutorial to get started with jj




## `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 evolog -p` instead.

**Usage:** `jj interdiff [OPTIONS] <--from <REVSET>|--to <REVSET>> [FILESETS]...`

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

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

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

* `-f`, `--from <REVSET>` — Show changes from this revision
* `-t`, `--to <REVSET>` — Show changes to this revision
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted
* `--stat` — Show a histogram of the changes
* `--types` — For each path, show only its type before and after

   The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule.
* `--name-only` — For each path, show only its path

   Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g`
* `--git` — Show a Git-format diff
* `--color-words` — Show a word-level diff with changes indicated only by color
* `--tool <TOOL>` — Generate diff by external command

   A builtin format can also be specified as `:<name>`. For example, `--tool=:git` is equivalent to `--git`.
* `--context <CONTEXT>` — Number of lines of context to show
* `-w`, `--ignore-all-space` — Ignore whitespace when comparing lines
* `-b`, `--ignore-space-change` — Ignore changes in amount of whitespace when comparing lines



## `jj log`

Show revision history

Renders a graphical view of the project's history, ordered with children before parents. By default, the output only includes mutable revisions, along with some additional revisions for context. Use `jj log -r ::` to see all revisions. See [`jj help -k revsets`] for information about the syntax.

[`jj help -k revsets`]: https://jj-vcs.github.io/jj/latest/revsets/

Spans of revisions that are not included in the graph per `--revisions` are rendered as a synthetic node labeled "(elided revisions)".

The working-copy commit is indicated by a `@` symbol in the graph. [Immutable revisions] have a `◆` symbol. Other commits have a `○` symbol. All of these symbols can be [customized].

[Immutable revisions]: https://jj-vcs.github.io/jj/latest/config/#set-of-immutable-commits

[customized]: https://jj-vcs.github.io/jj/latest/config/#node-style

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

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

* `<FILESETS>` — Show revisions modifying the given paths

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

* `-r`, `--revisions <REVSETS>` — Which revisions to show

   If no paths nor revisions are specified, this defaults to the `revsets.log` setting.
* `-n`, `--limit <LIMIT>` — Limit number of revisions to show

   Applied after revisions are filtered and reordered topologically, but before being reversed.
* `--reversed` — Show revisions in the opposite order (older revisions first)
* `--no-graph` — Don't show the graph, show a flat list of revisions
* `-T`, `--template <TEMPLATE>` — Render each revision using the given template

   Run `jj log -T` to list the built-in templates.

   You can also specify arbitrary template expressions using the [built-in keywords]. See [`jj help -k templates`] for more information.

   If not specified, this defaults to the `templates.log` setting.

   [built-in keywords]: https://jj-vcs.github.io/jj/latest/templates/#commit-keywords

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/
* `-p`, `--patch` — Show patch
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted
* `--stat` — Show a histogram of the changes
* `--types` — For each path, show only its type before and after

   The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule.
* `--name-only` — For each path, show only its path

   Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g`
* `--git` — Show a Git-format diff
* `--color-words` — Show a word-level diff with changes indicated only by color
* `--tool <TOOL>` — Generate diff by external command

   A builtin format can also be specified as `:<name>`. For example, `--tool=:git` is equivalent to `--git`.
* `--context <CONTEXT>` — Number of lines of context to show
* `--ignore-all-space` — Ignore whitespace when comparing lines
* `--ignore-space-change` — Ignore changes in amount of whitespace when comparing lines



## `jj metaedit`

Modify the metadata of a revision without changing its content

**Usage:** `jj metaedit [OPTIONS] [REVSETS]...`

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

* `<REVSETS>` — The revision(s) to modify (default: @)

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

* `--update-change-id` — Generate a new change-id

   This generates a new change-id for the revision.
* `--update-author-timestamp` — Update the author timestamp

   This updates the author date to now, without modifying the author.
* `--update-author` — Update the author to the configured user

   This updates the author name and email. The author timestamp is not modified – use --update-author-timestamp to update the author timestamp.

   You can use it in combination with the JJ_USER and JJ_EMAIL environment variables to set a different author:

   $ JJ_USER='Foo Bar' JJ_EMAIL=foo@bar.com jj metaedit --update-author
* `--author <AUTHOR>` — Set author to the provided string

   This changes author name and email while retaining author timestamp for non-discardable commits.
* `--author-timestamp <AUTHOR_TIMESTAMP>` — Set the author date to the given date either human readable, eg Sun, 23 Jan 2000 01:23:45 JST) or as a time stamp, eg 2000-01-23T01:23:45+09:00)
* `--update-committer-timestamp` — Update the committer timestamp

   This updates the committer date to now, without modifying the committer.

   Even if this option is not passed, the committer timestamp will be updated if other metadata is updated. This option effectively just forces every commit to be rewritten whether or not there are other changes.



## `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 working copy and the `main` bookmark as parents.

[working copy]: https://jj-vcs.github.io/jj/latest/working-copy/

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

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

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

  Default value: `@`

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

* `-m`, `--message <MESSAGE>` — The change description to use
* `--no-edit` — Do not edit the newly created change
* `-A`, `--insert-after <REVSETS>` [alias: `after`] — Insert the new change after the given commit(s)

   Example: `jj new --after A` creates a new change between `A` and its
   children:

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

   Specifying `--after` multiple times will relocate all children of the
   given commits.

   Example: `jj new --after A --after X` creates a change with `A` and `X`
   as parents, and rebases all children on top of the new change:

   ```text
                   B   Y
                    \ /
       B  Y    =>    @
       |  |         / \
       A  X        A   X
   ```
* `-B`, `--insert-before <REVSETS>` [alias: `before`] — Insert the new change before the given commit(s)

   Example: `jj new --before C` creates a new change between `C` and its
   parents:

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

   `--after` and `--before` can be combined.

   Example: `jj new --after A --before D`:

   ```text

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

   Similar to `--after`, you can specify `--before` multiple times.



## `jj next`

Move the working-copy commit to the child revision

The command creates a new empty working copy revision that is the child of a
descendant `offset` revisions ahead of the parent of the current working
copy.

For example, when the offset is 1:

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

If `--edit` is passed, the working copy revision is changed to the child of
the current working copy revision.

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

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

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

* `<OFFSET>` — How many revisions to move forward. Advances to the next child by default

  Default value: `1`

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

* `-e`, `--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`)

   Takes precedence over config in `ui.movement.edit`; i.e. will negate `ui.movement.edit = false`
* `-n`, `--no-edit` — The inverse of `--edit`

   Takes precedence over config in `ui.movement.edit`; i.e. will negate `ui.movement.edit = true`
* `--conflict` — Jump to the next conflicted descendant



## `jj operation`

Commands for working with the operation log

See the [operation log documentation] for more information.

[operation log documentation]: https://jj-vcs.github.io/jj/latest/operation-log/

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

**Command Alias:** `op`

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

* `abandon` — Abandon operation history
* `diff` — Compare changes to the repository between two operations
* `log` — Show the operation log
* `restore` — Create a new operation that restores the repo to an earlier state
* `revert` — Create a new operation that reverts an earlier operation
* `show` — Show changes to the repository in an operation



## `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>..@-`.

Previous versions of a change (or predecessors) are also discarded if they become unreachable from the operation history. 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 diff`

Compare changes to the repository between two operations

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

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

* `--operation <OPERATION>` [alias: `op`] — Show repository changes in this operation, compared to its parent
* `-f`, `--from <FROM>` — Show repository changes from this operation
* `-t`, `--to <TO>` — Show repository changes to this operation
* `--no-graph` — Don't show the graph, show a flat list of modified changes
* `-p`, `--patch` — Show patch of modifications to changes

   If the previous version has different parents, it will be temporarily rebased to the parents of the new version, so the diff is not contaminated by unrelated changes.
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted
* `--stat` — Show a histogram of the changes
* `--types` — For each path, show only its type before and after

   The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule.
* `--name-only` — For each path, show only its path

   Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g`
* `--git` — Show a Git-format diff
* `--color-words` — Show a word-level diff with changes indicated only by color
* `--tool <TOOL>` — Generate diff by external command

   A builtin format can also be specified as `:<name>`. For example, `--tool=:git` is equivalent to `--git`.
* `--context <CONTEXT>` — Number of lines of context to show
* `--ignore-all-space` — Ignore whitespace when comparing lines
* `--ignore-space-change` — Ignore changes in amount of whitespace when comparing lines



## `jj operation log`

Show the operation log

Like other commands, `jj op log` snapshots the current working-copy changes and reconciles divergent operations. Use `--at-op=@ --ignore-working-copy` to inspect the current state without mutation.

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

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

* `-n`, `--limit <LIMIT>` — Limit number of operations to show

   Applied after operations are reordered topologically, but before being reversed.
* `--reversed` — Show operations in the opposite order (older operations first)
* `--no-graph` — Don't show the graph, show a flat list of operations
* `-T`, `--template <TEMPLATE>` — Render each operation using the given template

   You can specify arbitrary template expressions using the [built-in keywords]. See [`jj help -k templates`] for more information.

   [built-in keywords]: https://jj-vcs.github.io/jj/latest/templates/#operation-keywords

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/
* `-d`, `--op-diff` — Show changes to the repository at each operation
* `-p`, `--patch` — Show patch of modifications to changes (implies --op-diff)

   If the previous version has different parents, it will be temporarily rebased to the parents of the new version, so the diff is not contaminated by unrelated changes.
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted
* `--stat` — Show a histogram of the changes
* `--types` — For each path, show only its type before and after

   The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule.
* `--name-only` — For each path, show only its path

   Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g`
* `--git` — Show a Git-format diff
* `--color-words` — Show a word-level diff with changes indicated only by color
* `--tool <TOOL>` — Generate diff by external command

   A builtin format can also be specified as `:<name>`. For example, `--tool=:git` is equivalent to `--git`.
* `--context <CONTEXT>` — Number of lines of context to show
* `--ignore-all-space` — Ignore whitespace when comparing lines
* `--ignore-space-change` — Ignore changes in amount of whitespace when comparing lines



## `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

   Use `jj op log` to find an operation to restore to. Use e.g. `jj --at-op=<operation ID> log` before restoring to an operation to see the state of the repo at that operation.

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

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

   This option is EXPERIMENTAL.

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

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




## `jj operation revert`

Create a new operation that reverts an earlier operation

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

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

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

* `<OPERATION>` — The operation to revert

   Use `jj op log` to find an operation to revert.

  Default value: `@`

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

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

   This option is EXPERIMENTAL.

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

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




## `jj operation show`

Show changes to the repository in an operation

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

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

* `<OPERATION>` — Show repository changes in this operation, compared to its parent(s)

  Default value: `@`

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

* `--no-graph` — Don't show the graph, show a flat list of modified changes
* `-T`, `--template <TEMPLATE>` — Render the operation using the given template

   You can specify arbitrary template expressions using the [built-in keywords]. See [`jj help -k templates`] for more information.

   [built-in keywords]: https://jj-vcs.github.io/jj/latest/templates/#operation-keywords

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/
* `-p`, `--patch` — Show patch of modifications to changes

   If the previous version has different parents, it will be temporarily rebased to the parents of the new version, so the diff is not contaminated by unrelated changes.
* `--no-op-diff` — Do not show operation diff
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted
* `--stat` — Show a histogram of the changes
* `--types` — For each path, show only its type before and after

   The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule.
* `--name-only` — For each path, show only its path

   Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g`
* `--git` — Show a Git-format diff
* `--color-words` — Show a word-level diff with changes indicated only by color
* `--tool <TOOL>` — Generate diff by external command

   A builtin format can also be specified as `:<name>`. For example, `--tool=:git` is equivalent to `--git`.
* `--context <CONTEXT>` — Number of lines of context to show
* `--ignore-all-space` — Ignore whitespace when comparing lines
* `--ignore-space-change` — Ignore changes in amount of whitespace when comparing lines



## `jj parallelize`

Parallelize revisions by making them siblings

Running `jj parallelize 1::2` will transform the history like this:
```text
3
|             3
2            / \
|    ->     1   2
1            \ /
|             0
0
```

The command effectively says "these revisions are actually independent",
meaning that they should no longer be ancestors/descendants of each other.
However, revisions outside the set that were previously ancestors of a
revision in the set will remain ancestors of it. For example, revision 0
above remains an ancestor of both 1 and 2. Similarly,
revisions outside the set that were previously descendants of a revision
in the set will remain descendants of it. For example, revision 3 above
remains a descendant of both 1 and 2.

Therefore, `jj parallelize '1 | 3'` is a no-op. That's because 2, which is
not in the target set, was a descendant of 1 before, so it remains a
descendant, and it was an ancestor of 3 before, so it remains an ancestor.

**Usage:** `jj parallelize [REVSETS]...`

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

* `<REVSETS>` — Revisions to parallelize



## `jj prev`

Change the working copy revision relative to the parent revision

The command creates a new empty working copy revision that is the child of
an ancestor `offset` revisions behind the parent of the current working
copy.

For example, when the offset is 1:

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

If `--edit` is passed, the working copy revision is changed to the parent of
the current working copy revision.

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

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

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

* `<OFFSET>` — How many revisions to move backward. Moves to the parent by default

  Default value: `1`

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

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

   Takes precedence over config in `ui.movement.edit`; i.e. will negate `ui.movement.edit = false`
* `-n`, `--no-edit` — The inverse of `--edit`

   Takes precedence over config in `ui.movement.edit`; i.e. will negate `ui.movement.edit = true`
* `--conflict` — Jump to the previous conflicted ancestor



## `jj rebase`

Move revisions to different parent(s)

This command moves revisions to different parent(s) while preserving the
changes (diff) in the revisions.

There are three different ways of specifying which revisions to rebase:

* `--source/-s` to rebase a revision and its descendants
* `--branch/-b` to rebase a whole branch, relative to the destination
* `--revisions/-r` to rebase the specified revisions without their
  descendants

If no option is specified, it defaults to `-b @`.

There are three different ways of specifying where the revisions should be
rebased to:

* `--destination/-d` to rebase the revisions onto the specified targets
* `--insert-after/-A` to rebase the revisions onto the specified targets and
  to rebase the targets' descendants onto the rebased revisions
* `--insert-before/-B` to rebase the revisions onto the specified targets'
  parents and to rebase the targets and their descendants onto the rebased
  revisions

See the sections below for details about the different ways of specifying
which revisions to rebase where.

If a working-copy revision gets abandoned, it will be given a new, empty
revision. This is true in general; it is not specific to this command.

### Specifying which revisions to rebase

With `--source/-s`, the command rebases the specified revision and its
descendants to 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
```

Each revision passed to `-s` will become a direct child of the destination,
so if you instead run `jj rebase -s M -s N -d O` (or `jj rebase -s 'M|N' -d
O`) in the example above, then N' would instead be a direct child of O.

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

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

In other words, `jj rebase -b X -d Y` rebases revisions 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 `--revisions/-r`, the command rebases only the specified revisions to
the destination. Any "hole" left behind will be filled by rebasing
descendants onto the specified revisions' 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
```

Multiple revisions can be specified, and any dependencies (graph edges)
within the set will be preserved. For example, `jj rebase -r 'K|N' -d O`
would transform your history like this:

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

`jj rebase -s X` is similar to `jj rebase -r X::` and will behave the same
if X is a single revision. However, if X is a set of multiple revisions,
or if you passed multiple `-s` arguments, then `jj rebase -s` will make each
of the specified revisions an immediate child of the destination, while
`jj rebase -r` will preserve dependencies within the set.

Note that you can create a merge revision by repeating the `-d` argument.
For example, if you realize that revision L actually depends on revision 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
```

### Specifying where to rebase the revisions

With `--destination/-d`, the command rebases the selected revisions onto
the targets. Existing descendants of the targets will not be affected. See
the section above for examples.

With `--insert-after/-A`, the selected revisions will be inserted after the
targets. This is similar to `-d`, but if the targets have any existing
descendants, then those will be rebased onto the rebased selected revisions.

For example, `jj rebase -r K -A L` will rewrite history like this:
```text
N           N'
|           |
| M         | M'
|/          |/
L      =>   K'
|           |
| K         L
|/          |
J           J
```

The `-A` (and `-B`) argument can also be used for reordering revisions. For
example, `jj rebase -r M -A J` will rewrite history like this:
```text
M          L'
|          |
L          K'
|     =>   |
K          M'
|          |
J          J
```

With `--insert-before/-B`, the selected revisions will be inserted before
the targets. This is achieved by rebasing the selected revisions onto the
target revisions' parents, and then rebasing the target revisions and their
descendants onto the rebased revisions.

For example, `jj rebase -r K -B L` will rewrite history like this:
```text
N           N'
|           |
| M         | M'
|/          |/
L     =>    L'
|           |
| K         K'
|/          |
J           J
```

The `-A` and `-B` arguments can also be combined, which can be useful around
merges. For example, you can use `jj rebase -r K -A J -B M` to create a new
merge (but `jj rebase -r M -d L -d K` might be simpler in this particular
case):
```text
M           M'
|           |\
L           L |
|     =>    | |
| K         | K'
|/          |/
J           J
```

To insert a commit inside an existing merge with `jj rebase -r O -A K -B M`:
```text
O           N'
|           |\
N           | M'
|\          | |\
| M         | O'|
| |    =>   |/ /
| L         | L
| |         | |
K |         K |
|/          |/
J           J
```

**Usage:** `jj rebase [OPTIONS] <--destination <REVSETS>|--insert-after <REVSETS>|--insert-before <REVSETS>>`

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

* `-b`, `--branch <REVSETS>` — Rebase the whole branch relative to destination's ancestors (can be repeated)

   `jj rebase -b=br -d=dst` is equivalent to `jj rebase '-s=roots(dst..br)' -d=dst`.

   If none of `-b`, `-s`, or `-r` is provided, then the default is `-b @`.
* `-s`, `--source <REVSETS>` — Rebase specified revision(s) together with their trees of descendants (can be repeated)

   Each specified revision will become a direct child of the destination revision(s), even if some of the source revisions are descendants of others.

   If none of `-b`, `-s`, or `-r` is provided, then the default is `-b @`.
* `-r`, `--revisions <REVSETS>` — Rebase the given revisions, rebasing descendants onto this revision's parent(s)

   Unlike `-s` or `-b`, you may `jj rebase -r` a revision `A` onto a descendant of `A`.

   If none of `-b`, `-s`, or `-r` is provided, then the default is `-b @`.
* `-d`, `--destination <REVSETS>` — The revision(s) to rebase onto (can be repeated to create a merge commit)
* `-A`, `--insert-after <REVSETS>` [alias: `after`] — The revision(s) to insert after (can be repeated to create a merge commit)
* `-B`, `--insert-before <REVSETS>` [alias: `before`] — The revision(s) to insert before (can be repeated to create a merge commit)
* `--skip-emptied` — If true, when rebasing would produce an empty commit, the commit is abandoned. It will not be abandoned if it was already empty before the rebase. Will never skip merge commits with multiple non-empty parents
* `--keep-divergent` — Keep divergent commits while rebasing

   Without this flag, divergent commits are abandoned while rebasing if another commit with the same change ID is already present in the destination with identical changes.



## `jj redo`

Redo the most recently undone operation

This is the natural counterpart of `jj undo`. Repeated invocations of `jj undo` and `jj redo` act similarly to Undo/Redo commands in a text editor.

Use `jj op log` to visualize the log of past operations, including a detailed description of any past undo/redo operations. See also `jj op restore` to explicitly restore an older operation by its id (available in the operation log).

**Usage:** `jj redo`



## `jj resolve`

Resolve conflicted files 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. External merge tools will be invoked for each conflicted file one-by-one until all conflicts are resolved. To stop resolving conflicts, exit the merge tool without making any changes.

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] [FILESETS]...`

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

* `<FILESETS>` — Only resolve conflicts in these paths. You can use the `--list` argument to find paths to use here

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

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

  Default value: `@`
* `-l`, `--list` — Instead of resolving conflicts, list all the conflicts
* `--tool <NAME>` — Specify 3-way merge tool to be used

   The built-in merge tools `:ours` and `:theirs` can be used to choose side #1 and side #2 of the conflict respectively.



## `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] [FILESETS]...`

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

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

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

* `-f`, `--from <REVSET>` — Revision to restore from (source)
* `-t`, `--into <REVSET>` [alias: `to`] — Revision to restore into (destination)
* `-c`, `--changes-in <REVSET>` — Undo the changes in a revision as compared to the merge of its parents.

   This undoes the changes that can be seen with `jj diff -r REVSET`. If `REVSET` only has a single parent, this option is equivalent to `jj restore --into REVSET --from REVSET-`.

   The default behavior of `jj restore` is equivalent to `jj restore --changes-in @`.
* `-i`, `--interactive` — Interactively choose which parts to restore
* `--tool <NAME>` — Specify diff editor to be used (implies --interactive)
* `--restore-descendants` — Preserve the content (not the diff) when rebasing descendants



## `jj revert`

Apply the reverse of the given revision(s)

The reverse of each of the given revisions is applied sequentially in reverse topological order at the given location.

The description of the new revisions can be customized with the `templates.revert_description` config variable.

**Usage:** `jj revert [OPTIONS] <--destination <REVSETS>|--insert-after <REVSETS>|--insert-before <REVSETS>>`

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

* `-r`, `--revisions <REVSETS>` — The revision(s) to apply the reverse of
* `-d`, `--destination <REVSETS>` — The revision(s) to apply the reverse changes on top of
* `-A`, `--insert-after <REVSETS>` [alias: `after`] — The revision(s) to insert the reverse changes after (can be repeated to create a merge commit)
* `-B`, `--insert-before <REVSETS>` [alias: `before`] — The revision(s) to insert the reverse changes before (can be repeated to create a merge commit)



## `jj root`

Show the current workspace root directory (shortcut for `jj workspace root`)

**Usage:** `jj root`



## `jj show`

Show commit description and changes in a revision

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

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

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

  Default value: `@`

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

* `-T`, `--template <TEMPLATE>` — Render a revision using the given template

   You can specify arbitrary template expressions using the [built-in keywords]. See [`jj help -k templates`] for more information.

   [built-in keywords]: https://jj-vcs.github.io/jj/latest/templates/#commit-keywords

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted
* `--stat` — Show a histogram of the changes
* `--types` — For each path, show only its type before and after

   The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule.
* `--name-only` — For each path, show only its path

   Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g`
* `--git` — Show a Git-format diff
* `--color-words` — Show a word-level diff with changes indicated only by color
* `--tool <TOOL>` — Generate diff by external command

   A builtin format can also be specified as `:<name>`. For example, `--tool=:git` is equivalent to `--git`.
* `--context <CONTEXT>` — Number of lines of context to show
* `--no-patch` — Do not show the patch
* `-w`, `--ignore-all-space` — Ignore whitespace when comparing lines
* `-b`, `--ignore-space-change` — Ignore changes in amount of whitespace when comparing lines



## `jj sign`

Cryptographically sign a revision

This command requires configuring a [commit signing] backend.

[commit signing]: https://jj-vcs.github.io/jj/latest/config/#commit-signing

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

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

* `-r`, `--revisions <REVSETS>` — What revision(s) to sign

   If no revisions are specified, this defaults to the `revsets.sign` setting.

   Note that revisions are always re-signed.

   While that leads to discomfort for users, which sign with hardware devices, as of now we cannot reliably check if a commit is already signed by the user without creating a signature (see [#5786]).

   [#5786]: https://github.com/jj-vcs/jj/issues/5786
* `--key <KEY>` — The key used for signing



## `jj simplify-parents`

Simplify parent edges for the specified revision(s).

Removes all parents of each of the specified revisions that are also indirect ancestors of the same revisions through other parents. This has no effect on any revision's contents, including the working copy.

In other words, for all (A, B, C) where A has (B, C) as parents and C is an ancestor of B, A will be rewritten to have only B as a parent instead of B+C.

**Usage:** `jj simplify-parents [OPTIONS]`

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

* `-s`, `--source <REVSETS>` — Simplify specified revision(s) together with their trees of descendants (can be repeated)
* `-r`, `--revisions <REVSETS>` — Simplify specified revision(s) (can be repeated)

   If both `--source` and `--revisions` are not provided, this defaults to the `revsets.simplify-parents` setting, or `reachable(@, mutable())` if it is not set.



## `jj sparse`

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

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

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

* `edit` — Start an editor to update the patterns that are present in the working copy
* `list` — List the patterns that are currently present in the working copy
* `reset` — Reset the patterns to include all files in the working copy
* `set` — Update the patterns that are present in the working copy



## `jj sparse edit`

Start an editor to update the patterns that are present in the working copy

**Usage:** `jj sparse edit`



## `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 reset`

Reset the patterns to include all files in the working copy

**Usage:** `jj sparse reset`



## `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)



## `jj split`

Split a revision in two

Starts a [diff editor] on the changes in the revision. Edit the right side of the diff until it has the content you want in the new 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.

[diff editor]: https://jj-vcs.github.io/jj/latest/config/#editing-diffs

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 remaining changes will not get a description, and you will be asked for a description only for the selected changes.

Splitting an empty commit is not supported because the same effect can be achieved with `jj new`.

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

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

* `<FILESETS>` — Files matching any of these filesets are put in the selected changes

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

* `-i`, `--interactive` — Interactively choose which parts to split

   This is the default if no filesets are provided.
* `--tool <NAME>` — Specify diff editor to be used (implies --interactive)
* `-r`, `--revision <REVSET>` — The revision to split

  Default value: `@`
* `-d`, `--destination <REVSETS>` — The revision(s) to base the new revision onto (can be repeated to create a merge commit)
* `-A`, `--insert-after <REVSETS>` [alias: `after`] — The revision(s) to insert after (can be repeated to create a merge commit)
* `-B`, `--insert-before <REVSETS>` [alias: `before`] — The revision(s) to insert before (can be repeated to create a merge commit)
* `-m`, `--message <MESSAGE>` — The change description to use (don't open editor)

   The description is used for the commit with the selected changes. The source commit description is kept unchanged.
* `-p`, `--parallel` — Split the revision into two parallel revisions instead of a parent and child



## `jj squash`

Move changes from a revision into another revision

With the `-r` option, moves the changes from the specified revision to the parent revision. Fails if there are several parent revisions (i.e., the given revision is a merge).

With the `--from` and/or `--into` options, moves changes from/to the given revisions. If either is left out, it defaults to the working-copy commit. For example, `jj squash --into @--` moves changes from the working-copy commit to the grandparent.

If, after moving changes out, the source revision is empty compared to its parent(s), and `--keep-emptied` is not set, it will be abandoned. Without `--interactive` or paths, the source revision will always be empty.

If the source was abandoned 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.

If a working-copy commit gets abandoned, it will be given a new, empty commit. This is true in general; it is not specific to this command.

EXPERIMENTAL FEATURES

An alternative squashing UI is available via the `-d`, `-A`, and `-B` options. They can be used together with one or more `--from` options (if no `--from` is specified, `--from @` is assumed).

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

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

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

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

* `-r`, `--revision <REVSET>` — Revision to squash into its parent (default: @). Incompatible with the experimental `-d`/`-A`/`-B` options
* `-f`, `--from <REVSETS>` — Revision(s) to squash from (default: @)
* `-t`, `--into <REVSET>` [alias: `to`] — Revision to squash into (default: @)
* `-d`, `--destination <REVSETS>` — (Experimental) The revision(s) to use as parent for the new commit (can be repeated to create a merge commit)
* `-A`, `--insert-after <REVSETS>` [alias: `after`] — (Experimental) The revision(s) to insert the new commit after (can be repeated to create a merge commit)
* `-B`, `--insert-before <REVSETS>` [alias: `before`] — (Experimental) The revision(s) to insert the new commit before (can be repeated to create a merge commit)
* `-m`, `--message <MESSAGE>` — The description to use for squashed revision (don't open editor)
* `-u`, `--use-destination-message` — Use the description of the destination revision and discard the description(s) of the source revision(s)
* `-i`, `--interactive` — Interactively choose which parts to squash
* `--tool <NAME>` — Specify diff editor to be used (implies --interactive)
* `-k`, `--keep-emptied` — The source revision will not be abandoned



## `jj status`

Show high-level repo status [default alias: st]

This includes:

* The working copy commit and its parents, and a summary of the changes in the working copy (compared to the merged parents)

* Conflicts in the working copy

* [Conflicted bookmarks]

[Conflicted bookmarks]: https://jj-vcs.github.io/jj/latest/bookmarks/#conflicts

**Usage:** `jj status [FILESETS]...`

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

* `<FILESETS>` — Restrict the status display to these paths



## `jj tag`

Manage tags

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

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

* `list` — List tags



## `jj tag list`

List tags

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

**Command Alias:** `l`

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

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

   By default, the specified name matches exactly. Use `glob:` prefix to select tags by [wildcard pattern].

   [wildcard pattern]: https://jj-vcs.github.io/jj/latest/revsets/#string-patterns

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

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

   All 0-argument methods of the [`CommitRef` type] are available as keywords in the template expression. See [`jj help -k templates`] for more information.

   [`CommitRef` type]: https://jj-vcs.github.io/jj/latest/templates/#commitref-type

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/



## `jj undo`

Undo the last operation

If used once after a normal (non-`undo`) operation, this will undo that last operation by restoring its parent. If `jj undo` is used repeatedly, it will restore increasingly older operations, going further back into the past.

There is also a complementary `jj redo` command that would instead move in the direction of the future after one or more `jj undo`s.

Use `jj op log` to visualize the log of past operations, including a detailed description of any past undo/redo operations. See also `jj op restore` to explicitly restore an older operation by its id (available in the operation log).

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

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

* `<OPERATION>` — (deprecated, use `jj op revert <operation>`)

   The operation to undo

   Use `jj op log` to find an operation to undo.

  Default value: `@`



## `jj unsign`

Drop a cryptographic signature

See also [commit signing] docs.

[commit signing]: https://jj-vcs.github.io/jj/latest/config/#commit-signing

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

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

* `-r`, `--revisions <REVSETS>` — What revision(s) to unsign



## `jj util`

Infrequently used commands such as for generating shell completions

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

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

* `completion` — Print a command-line-completion script
* `config-schema` — Print the JSON schema for the jj TOML config format
* `exec` — Execute an external command via jj
* `gc` — Run backend-dependent garbage collection
* `install-man-pages` — Install Jujutsu's manpages to the provided path
* `markdown-help` — Print the CLI help for all subcommands in Markdown



## `jj util completion`

Print a command-line-completion script

Apply it by running one of these:

- Bash: `source <(jj util completion bash)`
- Fish: `jj util completion fish | source`
- Nushell:
    ```nu
    jj util completion nushell | save "completions-jj.nu"
    use "completions-jj.nu" *  # Or `source "completions-jj.nu"`
    ```
- Zsh:
    ```shell
    autoload -U compinit
    compinit
    source <(jj util completion zsh)
    ```

See the docs on [command-line completion] for more details.

[command-line completion]:
   https://jj-vcs.github.io/jj/latest/install-and-setup/#command-line-completion

**Usage:** `jj util completion <SHELL>`

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

* `<SHELL>`

  Possible values: `bash`, `elvish`, `fish`, `nushell`, `power-shell`, `zsh`




## `jj util config-schema`

Print the JSON schema for the jj TOML config format

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



## `jj util exec`

Execute an external command via jj

This command will have access to the environment variable JJ_WORKSPACE_ROOT.

This is useful for arbitrary aliases.

!! WARNING !!

The following technique just provides a convenient syntax for running
arbitrary code on your system. Using it irresponsibly may cause damage
ranging from breaking the behavior of `jj undo` to wiping your file system.
Exercise the same amount of caution while writing these aliases as you would
when typing commands into the terminal!

This feature may be removed or replaced by an embedded scripting language in
the future.

Let's assume you have a script called "my-jj-script" in you $PATH and you
would like to execute it as "jj my-script". You would add the following line
to your configuration file to achieve that:

```toml
[aliases]
my-script = ["util", "exec", "--", "my-jj-script"]
#                            ^^^^
# This makes sure that flags are passed to your script instead of parsed by jj.
```

If you don't want to manage your script as a separate file, you can even
inline it into your config file:

```toml
[aliases]
my-inline-script = ["util", "exec", "--", "bash", "-c", """
set -euo pipefail
echo "Look Ma, everything in one file!"
echo "args: $@"
""", ""]
#    ^^
# This last empty string will become "$0" in bash, so your actual arguments
# are all included in "$@" and start at "$1" as expected.
```

> Note: Shebangs (e.g. `#!/usr/bin/env`) aren't necessary since you're
> already explicitly passing your script into the right shell.

**Usage:** `jj util exec <COMMAND> [ARGS]...`

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

* `<COMMAND>` — External command to execute
* `<ARGS>` — Arguments to pass to the external command



## `jj util gc`

Run backend-dependent garbage collection.

To garbage-collect old operations and the commits/objects referenced by them, run `jj op abandon ..<some old operation>` before `jj util gc`.

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

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

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

   By default, only obsolete objects and operations older than 2 weeks are pruned.

   Only the string "now" can be passed to this parameter. Support for arbitrary absolute and relative timestamps will come in a subsequent release.



## `jj util install-man-pages`

Install Jujutsu's manpages to the provided path

**Usage:** `jj util install-man-pages <PATH>`

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

* `<PATH>` — The path where manpages will installed. An example path might be `/usr/share/man`. The provided path will be appended with `man1`, etc., as appropriate



## `jj util markdown-help`

Print the CLI help for all subcommands in Markdown

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



## `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`.

Each workspace also has own sparse patterns.

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

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

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



## `jj workspace add`

Add a workspace

By default, the new workspace inherits the sparse patterns of the current workspace. You can override this with the `--sparse-patterns` option.

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

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

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

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

* `--name <NAME>` — A name for the workspace

   To override the default, which is the basename of the destination directory.
* `-r`, `--revision <REVSETS>` — A list of parent revisions for the working-copy commit of the newly created workspace. You may specify nothing, or any number of parents.

   If no revisions are specified, the new workspace will be created, and its working-copy commit will exist on top of the parent(s) of the working-copy commit in the current workspace, i.e. they will share the same parent(s).

   If any revisions are specified, the new workspace will be created, and the new working-copy commit will be created with all these revisions as parents, i.e. the working-copy commit will exist as if you had run `jj new r1 r2 r3 ...`.
* `--sparse-patterns <SPARSE_PATTERNS>` — How to handle sparse patterns when creating a new workspace

  Default value: `copy`

  Possible values:
  - `copy`:
    Copy all sparse patterns from the current workspace
  - `full`:
    Include all files in the new workspace
  - `empty`:
    Clear all files from the workspace (it will be empty)




## `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 [OPTIONS]`

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

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

   All 0-argument methods of the [`WorkspaceRef` type] are available as keywords in the template expression. See [`jj help -k templates`] for more information.

   [`WorkspaceRef` type]: https://jj-vcs.github.io/jj/latest/templates/#workspaceref-type

   [`jj help -k templates`]: https://jj-vcs.github.io/jj/latest/templates/



## `jj workspace rename`

Renames the current workspace

**Usage:** `jj workspace rename <NEW_WORKSPACE_NAME>`

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

* `<NEW_WORKSPACE_NAME>` — The name of the workspace to update to



## `jj workspace root`

Show the current workspace root directory

**Usage:** `jj workspace root`



## `jj workspace update-stale`

Update a workspace that has become stale

See the [stale working copy documentation] for more information.

[stale working copy documentation]: https://jj-vcs.github.io/jj/latest/working-copy/#stale-working-copy

**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>