just playing with tangled
at diffedit3 2097 lines 58 kB view raw
1--- 2source: cli/tests/test_generate_md_cli_help.rs 3description: "AUTO-GENERATED FILE, DO NOT EDIT. This cli reference is generated as an `insta` snapshot. MkDocs follows they symlink from docs/cli-reference.md to the snap. Unfortunately, `insta` unavoidably creates this header. Luckily, MkDocs ignores the header since it has the same format as Markdown headers. TODO: MkDocs may fail on Windows if symlinks are not enabled in the OS settings" 4--- 5<!-- BEGIN MARKDOWN--> 6 7# Command-Line Help for `jj` 8 9This document contains the help content for the `jj` command-line program. 10 11**Command Overview:** 12 13* [`jj`↴](#jj) 14* [`jj abandon`↴](#jj-abandon) 15* [`jj backout`↴](#jj-backout) 16* [`jj branch`↴](#jj-branch) 17* [`jj branch create`↴](#jj-branch-create) 18* [`jj branch delete`↴](#jj-branch-delete) 19* [`jj branch forget`↴](#jj-branch-forget) 20* [`jj branch list`↴](#jj-branch-list) 21* [`jj branch rename`↴](#jj-branch-rename) 22* [`jj branch set`↴](#jj-branch-set) 23* [`jj branch track`↴](#jj-branch-track) 24* [`jj branch untrack`↴](#jj-branch-untrack) 25* [`jj cat`↴](#jj-cat) 26* [`jj chmod`↴](#jj-chmod) 27* [`jj commit`↴](#jj-commit) 28* [`jj config`↴](#jj-config) 29* [`jj config list`↴](#jj-config-list) 30* [`jj config get`↴](#jj-config-get) 31* [`jj config set`↴](#jj-config-set) 32* [`jj config edit`↴](#jj-config-edit) 33* [`jj config path`↴](#jj-config-path) 34* [`jj describe`↴](#jj-describe) 35* [`jj diff`↴](#jj-diff) 36* [`jj diffedit`↴](#jj-diffedit) 37* [`jj duplicate`↴](#jj-duplicate) 38* [`jj edit`↴](#jj-edit) 39* [`jj files`↴](#jj-files) 40* [`jj git`↴](#jj-git) 41* [`jj git remote`↴](#jj-git-remote) 42* [`jj git remote add`↴](#jj-git-remote-add) 43* [`jj git remote remove`↴](#jj-git-remote-remove) 44* [`jj git remote rename`↴](#jj-git-remote-rename) 45* [`jj git remote list`↴](#jj-git-remote-list) 46* [`jj git init`↴](#jj-git-init) 47* [`jj git fetch`↴](#jj-git-fetch) 48* [`jj git clone`↴](#jj-git-clone) 49* [`jj git push`↴](#jj-git-push) 50* [`jj git import`↴](#jj-git-import) 51* [`jj git export`↴](#jj-git-export) 52* [`jj init`↴](#jj-init) 53* [`jj interdiff`↴](#jj-interdiff) 54* [`jj log`↴](#jj-log) 55* [`jj move`↴](#jj-move) 56* [`jj new`↴](#jj-new) 57* [`jj next`↴](#jj-next) 58* [`jj obslog`↴](#jj-obslog) 59* [`jj operation`↴](#jj-operation) 60* [`jj operation abandon`↴](#jj-operation-abandon) 61* [`jj operation log`↴](#jj-operation-log) 62* [`jj operation undo`↴](#jj-operation-undo) 63* [`jj operation restore`↴](#jj-operation-restore) 64* [`jj parallelize`↴](#jj-parallelize) 65* [`jj prev`↴](#jj-prev) 66* [`jj rebase`↴](#jj-rebase) 67* [`jj resolve`↴](#jj-resolve) 68* [`jj restore`↴](#jj-restore) 69* [`jj root`↴](#jj-root) 70* [`jj show`↴](#jj-show) 71* [`jj sparse`↴](#jj-sparse) 72* [`jj sparse list`↴](#jj-sparse-list) 73* [`jj sparse set`↴](#jj-sparse-set) 74* [`jj sparse reset`↴](#jj-sparse-reset) 75* [`jj sparse edit`↴](#jj-sparse-edit) 76* [`jj split`↴](#jj-split) 77* [`jj squash`↴](#jj-squash) 78* [`jj status`↴](#jj-status) 79* [`jj tag`↴](#jj-tag) 80* [`jj tag list`↴](#jj-tag-list) 81* [`jj util`↴](#jj-util) 82* [`jj util completion`↴](#jj-util-completion) 83* [`jj util gc`↴](#jj-util-gc) 84* [`jj util mangen`↴](#jj-util-mangen) 85* [`jj util markdown-help`↴](#jj-util-markdown-help) 86* [`jj util config-schema`↴](#jj-util-config-schema) 87* [`jj undo`↴](#jj-undo) 88* [`jj unsquash`↴](#jj-unsquash) 89* [`jj untrack`↴](#jj-untrack) 90* [`jj version`↴](#jj-version) 91* [`jj workspace`↴](#jj-workspace) 92* [`jj workspace add`↴](#jj-workspace-add) 93* [`jj workspace forget`↴](#jj-workspace-forget) 94* [`jj workspace list`↴](#jj-workspace-list) 95* [`jj workspace root`↴](#jj-workspace-root) 96* [`jj workspace update-stale`↴](#jj-workspace-update-stale) 97 98## `jj` 99 100Jujutsu (An experimental VCS) 101 102To get started, see the tutorial at https://github.com/martinvonz/jj/blob/main/docs/tutorial.md. 103 104**Usage:** `jj [OPTIONS] [COMMAND]` 105 106###### **Subcommands:** 107 108* `abandon` — Abandon a revision 109* `backout` — Apply the reverse of a revision on top of another revision 110* `branch` — Manage branches 111* `cat` — Print contents of files in a revision 112* `chmod` — Sets or removes the executable bit for paths in the repo 113* `commit` — Update the description and create a new change on top 114* `config` — Manage config options 115* `describe` — Update the change description or other metadata 116* `diff` — Compare file contents between two revisions 117* `diffedit` — Touch up the content changes in a revision with a diff editor 118* `duplicate` — Create a new change with the same content as an existing one 119* `edit` — Sets the specified revision as the working-copy revision 120* `files` — List files in a revision 121* `git` — Commands for working with the underlying Git repo 122* `init` — Create a new repo in the given directory 123* `interdiff` — Compare the changes of two commits 124* `log` — Show revision history 125* `move` — Move changes from one revision into another 126* `new` — Create a new, empty change and (by default) edit it in the working copy 127* `next` — Move the working-copy commit to the child revision 128* `obslog` — Show how a change has evolved over time 129* `operation` — Commands for working with the operation log 130* `parallelize` — Parallelize revisions by making them siblings 131* `prev` — Change the working copy revision relative to the parent revision 132* `rebase` — Move revisions to different parent(s) 133* `resolve` — Resolve a conflicted file with an external merge tool 134* `restore` — Restore paths from another revision 135* `root` — Show the current workspace root directory 136* `show` — Show commit description and changes in a revision 137* `sparse` — Manage which paths from the working-copy commit are present in the working copy 138* `split` — Split a revision in two 139* `squash` — Move changes from a revision into another revision 140* `status` — Show high-level repo status 141* `tag` — Manage tags 142* `util` — Infrequently used commands such as for generating shell completions 143* `undo` — Undo an operation (shortcut for `jj op undo`) 144* `unsquash` — Move changes from a revision's parent into the revision 145* `untrack` — Stop tracking specified paths in the working copy 146* `version` — Display version information 147* `workspace` — Commands for working with workspaces 148 149###### **Options:** 150 151* `-R`, `--repository <REPOSITORY>` — Path to repository to operate on 152* `--ignore-working-copy` — Don't snapshot the working copy, and don't update it 153 154 Possible values: `true`, `false` 155 156* `--ignore-immutable` — Allow rewriting immutable commits 157 158 Possible values: `true`, `false` 159 160* `--at-operation <AT_OPERATION>` — Operation to load the repo at 161 162 Default value: `@` 163* `--debug` — Enable debug logging 164 165 Possible values: `true`, `false` 166 167* `--color <WHEN>` — When to colorize output (always, never, auto) 168* `--quiet` — Silence non-primary command output 169 170 Possible values: `true`, `false` 171 172* `--no-pager` — Disable the pager 173 174 Possible values: `true`, `false` 175 176* `--config-toml <TOML>` — Additional configuration options (can be repeated) 177 178 179 180## `jj abandon` 181 182Abandon a revision 183 184Abandon 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. 185 186If 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. 187 188**Usage:** `jj abandon [OPTIONS] [REVISIONS]...` 189 190###### **Arguments:** 191 192* `<REVISIONS>` — The revision(s) to abandon 193 194 Default value: `@` 195 196###### **Options:** 197 198* `-s`, `--summary` — Do not print every abandoned commit on a separate line 199 200 Possible values: `true`, `false` 201 202* `-r` — Ignored (but lets you pass `-r` for consistency with other commands) 203 204 205 206## `jj backout` 207 208Apply the reverse of a revision on top of another revision 209 210**Usage:** `jj backout [OPTIONS]` 211 212###### **Options:** 213 214* `-r`, `--revision <REVISION>` — The revision to apply the reverse of 215 216 Default value: `@` 217* `-d`, `--destination <DESTINATION>` — The revision to apply the reverse changes on top of 218 219 Default value: `@` 220 221 222 223## `jj branch` 224 225Manage branches. 226 227For information about branches, see https://github.com/martinvonz/jj/blob/main/docs/branches.md. 228 229**Usage:** `jj branch <COMMAND>` 230 231###### **Subcommands:** 232 233* `create` — Create a new branch 234* `delete` — Delete an existing branch and propagate the deletion to remotes on the next push 235* `forget` — Forget everything about a branch, including its local and remote targets 236* `list` — List branches and their targets 237* `rename` — Rename `old` branch name to `new` branch name 238* `set` — Update an existing branch to point to a certain commit 239* `track` — Start tracking given remote branches 240* `untrack` — Stop tracking given remote branches 241 242 243 244## `jj branch create` 245 246Create a new branch 247 248**Usage:** `jj branch create [OPTIONS] <NAMES>...` 249 250###### **Arguments:** 251 252* `<NAMES>` — The branches to create 253 254###### **Options:** 255 256* `-r`, `--revision <REVISION>` — The branch's target revision 257 258 259 260## `jj branch delete` 261 262Delete an existing branch and propagate the deletion to remotes on the next push 263 264**Usage:** `jj branch delete [NAMES]...` 265 266###### **Arguments:** 267 268* `<NAMES>` — The branches to delete 269 270###### **Options:** 271 272* `--glob <GLOB>` — Deprecated. Please prefix the pattern with `glob:` instead 273 274 275 276## `jj branch forget` 277 278Forget everything about a branch, including its local and remote targets. 279 280A forgotten branch will not impact remotes on future pushes. It will be recreated on future pulls if it still exists in the remote. 281 282**Usage:** `jj branch forget [NAMES]...` 283 284###### **Arguments:** 285 286* `<NAMES>` — The branches to forget 287 288###### **Options:** 289 290* `--glob <GLOB>` — Deprecated. Please prefix the pattern with `glob:` instead 291 292 293 294## `jj branch list` 295 296List branches and their targets 297 298By default, a tracking remote branch will be included only if its target is different from the local target. A non-tracking remote branch won't be listed. For a conflicted branch (both local and remote), old target revisions are preceded by a "-" and new target revisions are preceded by a "+". 299 300For information about branches, see https://github.com/martinvonz/jj/blob/main/docs/branches.md. 301 302**Usage:** `jj branch list [OPTIONS] [NAMES]...` 303 304###### **Arguments:** 305 306* `<NAMES>` — Show branches whose local name matches 307 308###### **Options:** 309 310* `-a`, `--all-remotes` — Show all tracking and non-tracking remote branches including the ones whose targets are synchronized with the local branches 311 312 Possible values: `true`, `false` 313 314* `-t`, `--tracked` — Show remote tracked branches only. Omits local Git-tracking branches by default 315 316 Possible values: `true`, `false` 317 318* `-c`, `--conflicted` — Show conflicted branches only 319 320 Possible values: `true`, `false` 321 322* `-r`, `--revisions <REVISIONS>` — Show branches whose local targets are in the given revisions 323 324 325 326## `jj branch rename` 327 328Rename `old` branch name to `new` branch name. 329 330The new branch name points at the same commit as the old branch name. 331 332**Usage:** `jj branch rename <OLD> <NEW>` 333 334###### **Arguments:** 335 336* `<OLD>` — The old name of the branch 337* `<NEW>` — The new name of the branch 338 339 340 341## `jj branch set` 342 343Update an existing branch to point to a certain commit 344 345**Usage:** `jj branch set [OPTIONS] <NAMES>...` 346 347###### **Arguments:** 348 349* `<NAMES>` — The branches to update 350 351###### **Options:** 352 353* `-r`, `--revision <REVISION>` — The branch's target revision 354* `-B`, `--allow-backwards` — Allow moving the branch backwards or sideways 355 356 Possible values: `true`, `false` 357 358 359 360 361## `jj branch track` 362 363Start tracking given remote branches 364 365A tracking remote branch will be imported as a local branch of the same name. Changes to it will propagate to the existing local branch on future pulls. 366 367**Usage:** `jj branch track <BRANCH@REMOTE>...` 368 369###### **Arguments:** 370 371* `<BRANCH@REMOTE>` — Remote branches to track 372 373 374 375## `jj branch untrack` 376 377Stop tracking given remote branches 378 379A non-tracking remote branch is just a pointer to the last-fetched remote branch. It won't be imported as a local branch on future pulls. 380 381**Usage:** `jj branch untrack <BRANCH@REMOTE>...` 382 383###### **Arguments:** 384 385* `<BRANCH@REMOTE>` — Remote branches to untrack 386 387 388 389## `jj cat` 390 391Print contents of files in a revision 392 393If the given path is a directory, files in the directory will be visited recursively. 394 395**Usage:** `jj cat [OPTIONS] <PATHS>...` 396 397###### **Arguments:** 398 399* `<PATHS>` — Paths to print 400 401###### **Options:** 402 403* `-r`, `--revision <REVISION>` — The revision to get the file contents from 404 405 Default value: `@` 406 407 408 409## `jj chmod` 410 411Sets or removes the executable bit for paths in the repo 412 413Unlike the POSIX `chmod`, `jj chmod` also works on Windows, on conflicted files, and on arbitrary revisions. 414 415**Usage:** `jj chmod [OPTIONS] <MODE> <PATHS>...` 416 417###### **Arguments:** 418 419* `<MODE>` 420 421 Possible values: 422 - `n`: 423 Make a path non-executable (alias: normal) 424 - `x`: 425 Make a path executable (alias: executable) 426 427* `<PATHS>` — Paths to change the executable bit for 428 429###### **Options:** 430 431* `-r`, `--revision <REVISION>` — The revision to update 432 433 Default value: `@` 434 435 436 437## `jj commit` 438 439Update the description and create a new change on top 440 441**Usage:** `jj commit [OPTIONS] [PATHS]...` 442 443###### **Arguments:** 444 445* `<PATHS>` — Put these paths in the first commit 446 447###### **Options:** 448 449* `-i`, `--interactive` — Interactively choose which changes to include in the first commit 450 451 Possible values: `true`, `false` 452 453* `--tool <NAME>` — Specify diff editor to be used (implies --interactive) 454* `-m`, `--message <MESSAGE>` — The change description to use (don't open editor) 455 456 457 458## `jj config` 459 460Manage config options 461 462Operates on jj configuration, which comes from the config file and environment variables. 463 464For file locations, supported config options, and other details about jj config, see https://github.com/martinvonz/jj/blob/main/docs/config.md. 465 466**Usage:** `jj config <COMMAND>` 467 468###### **Subcommands:** 469 470* `list` — List variables set in config file, along with their values 471* `get` — Get the value of a given config option. 472* `set` — Update config file to set the given option to a given value 473* `edit` — Start an editor on a jj config file 474* `path` — Print the path to the config file 475 476 477 478## `jj config list` 479 480List variables set in config file, along with their values 481 482**Usage:** `jj config list [OPTIONS] [NAME]` 483 484###### **Arguments:** 485 486* `<NAME>` — An optional name of a specific config option to look up 487 488###### **Options:** 489 490* `--include-defaults` — Whether to explicitly include built-in default values in the list 491 492 Possible values: `true`, `false` 493 494* `--include-overridden` — Allow printing overridden values 495 496 Possible values: `true`, `false` 497 498* `--user` — Target the user-level config 499 500 Possible values: `true`, `false` 501 502* `--repo` — Target the repo-level config 503 504 Possible values: `true`, `false` 505 506* `-T`, `--template <TEMPLATE>` — Render each variable using the given template 507 508 509 510## `jj config get` 511 512Get the value of a given config option. 513 514Unlike `jj config list`, the result of `jj config get` is printed without 515extra formatting and therefore is usable in scripting. For example: 516 517$ jj config list user.name 518user.name="Martin von Zweigbergk" 519$ jj config get user.name 520Martin von Zweigbergk 521 522**Usage:** `jj config get <NAME>` 523 524###### **Arguments:** 525 526* `<NAME>` 527 528 529 530## `jj config set` 531 532Update config file to set the given option to a given value 533 534**Usage:** `jj config set <--user|--repo> <NAME> <VALUE>` 535 536###### **Arguments:** 537 538* `<NAME>` 539* `<VALUE>` 540 541###### **Options:** 542 543* `--user` — Target the user-level config 544 545 Possible values: `true`, `false` 546 547* `--repo` — Target the repo-level config 548 549 Possible values: `true`, `false` 550 551 552 553 554## `jj config edit` 555 556Start an editor on a jj config file. 557 558Creates the file if it doesn't already exist regardless of what the editor does. 559 560**Usage:** `jj config edit <--user|--repo>` 561 562###### **Options:** 563 564* `--user` — Target the user-level config 565 566 Possible values: `true`, `false` 567 568* `--repo` — Target the repo-level config 569 570 Possible values: `true`, `false` 571 572 573 574 575## `jj config path` 576 577Print the path to the config file 578 579A config file at that path may or may not exist. 580 581See `jj config edit` if you'd like to immediately edit the file. 582 583**Usage:** `jj config path <--user|--repo>` 584 585###### **Options:** 586 587* `--user` — Target the user-level config 588 589 Possible values: `true`, `false` 590 591* `--repo` — Target the repo-level config 592 593 Possible values: `true`, `false` 594 595 596 597 598## `jj describe` 599 600Update the change description or other metadata 601 602Starts an editor to let you edit the description of a change. The editor will be $EDITOR, or `pico` if that's not defined (`Notepad` on Windows). 603 604**Usage:** `jj describe [OPTIONS] [REVISION]` 605 606###### **Arguments:** 607 608* `<REVISION>` — The revision whose description to edit 609 610 Default value: `@` 611 612###### **Options:** 613 614* `-r` — Ignored (but lets you pass `-r` for consistency with other commands) 615 616 Possible values: `true`, `false` 617 618* `-m`, `--message <MESSAGE>` — The change description to use (don't open editor) 619* `--stdin` — Read the change description from stdin 620 621 Possible values: `true`, `false` 622 623* `--no-edit` — Don't open an editor 624 625 Possible values: `true`, `false` 626 627* `--reset-author` — Reset the author to the configured user 628 629 Possible values: `true`, `false` 630 631 632 633 634## `jj diff` 635 636Compare file contents between two revisions 637 638With the `-r` option, which is the default, 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. 639 640With 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 branch name) to the working-copy commit. 641 642**Usage:** `jj diff [OPTIONS] [PATHS]...` 643 644###### **Arguments:** 645 646* `<PATHS>` — Restrict the diff to these paths 647 648###### **Options:** 649 650* `-r`, `--revision <REVISION>` — Show changes in this revision, compared to its parent(s) 651* `--from <FROM>` — Show changes from this revision 652* `--to <TO>` — Show changes to this revision 653* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted 654 655 Possible values: `true`, `false` 656 657* `--stat` — Show a histogram of the changes 658 659 Possible values: `true`, `false` 660 661* `--types` — For each path, show only its type before and after 662 663 Possible values: `true`, `false` 664 665* `--git` — Show a Git-format diff 666 667 Possible values: `true`, `false` 668 669* `--color-words` — Show a word-level diff with changes indicated only by color 670 671 Possible values: `true`, `false` 672 673* `--tool <TOOL>` — Generate diff by external command 674* `--context <CONTEXT>` — Number of lines of context to show 675 676 677 678## `jj diffedit` 679 680Touch up the content changes in a revision with a diff editor 681 682With the `-r` option, which is the default, starts a [diff editor] on the changes in the revision. 683 684With the `--from` and/or `--to` options, starts a [diff editor] comparing the "from" revision to the "to" revision. 685 686[diff editor]: https://martinvonz.github.io/jj/latest/config/#editing-diffs 687 688Edit the right side of the diff until it looks the way you want. Once you close the editor, the revision specified with `-r` or `--to` will be updated. Descendants will be rebased on top as usual, which may result in conflicts. 689 690See `jj restore` if you want to move entire files from one revision to another. See `jj squash -i` or `jj unsquash -i` if you instead want to move changes into or out of the parent revision. 691 692**Usage:** `jj diffedit [OPTIONS]` 693 694###### **Options:** 695 696* `-r`, `--revision <REVISION>` — The revision to touch up. Defaults to @ if neither --to nor --from are specified 697* `--from <FROM>` — Show changes from this revision. Defaults to @ if --to is specified 698* `--to <TO>` — Edit changes in this revision. Defaults to @ if --from is specified 699* `--tool <NAME>` — Specify diff editor to be used 700 701 702 703## `jj duplicate` 704 705Create a new change with the same content as an existing one 706 707**Usage:** `jj duplicate [REVISIONS]...` 708 709###### **Arguments:** 710 711* `<REVISIONS>` — The revision(s) to duplicate 712 713 Default value: `@` 714 715###### **Options:** 716 717* `-r` — Ignored (but lets you pass `-r` for consistency with other commands) 718 719 720 721## `jj edit` 722 723Sets the specified revision as the working-copy revision 724 725Note: it is generally recommended to instead use `jj new` and `jj squash`. 726 727For more information, see https://martinvonz.github.io/jj/latest/FAQ#how-do-i-resume-working-on-an-existing-change 728 729**Usage:** `jj edit <REVISION>` 730 731###### **Arguments:** 732 733* `<REVISION>` — The commit to edit 734 735###### **Options:** 736 737* `-r` — Ignored (but lets you pass `-r` for consistency with other commands) 738 739 Possible values: `true`, `false` 740 741 742 743 744## `jj files` 745 746List files in a revision 747 748**Usage:** `jj files [OPTIONS] [PATHS]...` 749 750###### **Arguments:** 751 752* `<PATHS>` — Only list files matching these prefixes (instead of all files) 753 754###### **Options:** 755 756* `-r`, `--revision <REVISION>` — The revision to list files in 757 758 Default value: `@` 759 760 761 762## `jj git` 763 764Commands for working with the underlying Git repo 765 766For a comparison with Git, including a table of commands, see https://github.com/martinvonz/jj/blob/main/docs/git-comparison.md. 767 768**Usage:** `jj git <COMMAND>` 769 770###### **Subcommands:** 771 772* `remote` — Manage Git remotes 773* `init` — Create a new Git backed repo 774* `fetch` — Fetch from a Git remote 775* `clone` — Create a new repo backed by a clone of a Git repo 776* `push` — Push to a Git remote 777* `import` — Update repo with changes made in the underlying Git repo 778* `export` — Update the underlying Git repo with changes made in the repo 779 780 781 782## `jj git remote` 783 784Manage Git remotes 785 786The Git repo will be a bare git repo stored inside the `.jj/` directory. 787 788**Usage:** `jj git remote <COMMAND>` 789 790###### **Subcommands:** 791 792* `add` — Add a Git remote 793* `remove` — Remove a Git remote and forget its branches 794* `rename` — Rename a Git remote 795* `list` — List Git remotes 796 797 798 799## `jj git remote add` 800 801Add a Git remote 802 803**Usage:** `jj git remote add <REMOTE> <URL>` 804 805###### **Arguments:** 806 807* `<REMOTE>` — The remote's name 808* `<URL>` — The remote's URL 809 810 811 812## `jj git remote remove` 813 814Remove a Git remote and forget its branches 815 816**Usage:** `jj git remote remove <REMOTE>` 817 818###### **Arguments:** 819 820* `<REMOTE>` — The remote's name 821 822 823 824## `jj git remote rename` 825 826Rename a Git remote 827 828**Usage:** `jj git remote rename <OLD> <NEW>` 829 830###### **Arguments:** 831 832* `<OLD>` — The name of an existing remote 833* `<NEW>` — The desired name for `old` 834 835 836 837## `jj git remote list` 838 839List Git remotes 840 841**Usage:** `jj git remote list` 842 843 844 845## `jj git init` 846 847Create a new Git backed repo 848 849**Usage:** `jj git init [OPTIONS] [DESTINATION]` 850 851###### **Arguments:** 852 853* `<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 854 855 Default value: `.` 856 857###### **Options:** 858 859* `--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 860 861 Possible values: `true`, `false` 862 863* `--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 864 865 866 867## `jj git fetch` 868 869Fetch from a Git remote 870 871If 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. 872 873**Usage:** `jj git fetch [OPTIONS]` 874 875###### **Options:** 876 877* `-b`, `--branch <BRANCH>` — Fetch only some of the branches 878 879 Default value: `glob:*` 880* `--remote <remote>` — The remote to fetch from (only named remotes are supported, can be repeated) 881* `--all-remotes` — Fetch from all remotes 882 883 Possible values: `true`, `false` 884 885 886 887 888## `jj git clone` 889 890Create a new repo backed by a clone of a Git repo 891 892The Git repo will be a bare git repo stored inside the `.jj/` directory. 893 894**Usage:** `jj git clone [OPTIONS] <SOURCE> [DESTINATION]` 895 896###### **Arguments:** 897 898* `<SOURCE>` — URL or path of the Git repo to clone 899* `<DESTINATION>` — The directory to write the Jujutsu repo to 900 901###### **Options:** 902 903* `--colocate` — Whether or not to colocate the Jujutsu repo with the git repo 904 905 Possible values: `true`, `false` 906 907 908 909 910## `jj git push` 911 912Push to a Git remote 913 914By default, pushes any branches pointing to `remote_branches(remote=<remote>)..@`. Use `--branch` to push specific branches. Use `--all` to push all branches. Use `--change` to generate branch names based on the change IDs of specific commits. 915 916**Usage:** `jj git push [OPTIONS]` 917 918###### **Options:** 919 920* `--remote <REMOTE>` — The remote to push to (only named remotes are supported) 921* `-b`, `--branch <BRANCH>` — Push only this branch, or branches matching a pattern (can be repeated) 922* `--all` — Push all branches (including deleted branches) 923 924 Possible values: `true`, `false` 925 926* `--tracked` — Push all tracked branches (including deleted branches) 927 928 Possible values: `true`, `false` 929 930* `--deleted` — Push all deleted branches 931 932 Possible values: `true`, `false` 933 934* `-r`, `--revisions <REVISIONS>` — Push branches pointing to these commits (can be repeated) 935* `-c`, `--change <CHANGE>` — Push this commit by creating a branch based on its change ID (can be repeated) 936* `--dry-run` — Only display what will change on the remote 937 938 Possible values: `true`, `false` 939 940 941 942 943## `jj git import` 944 945Update repo with changes made in the underlying Git repo 946 947If 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. 948 949**Usage:** `jj git import` 950 951 952 953## `jj git export` 954 955Update the underlying Git repo with changes made in the repo 956 957**Usage:** `jj git export` 958 959 960 961## `jj init` 962 963Create a new repo in the given directory 964 965If the given directory does not exist, it will be created. If no directory is given, the current directory is used. 966 967**Usage:** `jj init [DESTINATION]` 968 969###### **Arguments:** 970 971* `<DESTINATION>` — The destination directory 972 973 Default value: `.` 974 975###### **Options:** 976 977* `--git` — DEPRECATED: Use `jj git init` Use the Git backend, creating a jj repo backed by a Git repo 978 979 Possible values: `true`, `false` 980 981* `--git-repo <GIT_REPO>` — DEPRECATED: Use `jj git init` Path to a git repo the jj repo will be backed by 982 983 984 985## `jj interdiff` 986 987Compare the changes of two commits 988 989This excludes changes from other commits by temporarily rebasing `--from` onto `--to`'s parents. If you wish to compare the same change across versions, consider `jj obslog -p` instead. 990 991**Usage:** `jj interdiff [OPTIONS] <--from <FROM>|--to <TO>> [PATHS]...` 992 993###### **Arguments:** 994 995* `<PATHS>` — Restrict the diff to these paths 996 997###### **Options:** 998 999* `--from <FROM>` — Show changes from this revision 1000* `--to <TO>` — Show changes to this revision 1001* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted 1002 1003 Possible values: `true`, `false` 1004 1005* `--stat` — Show a histogram of the changes 1006 1007 Possible values: `true`, `false` 1008 1009* `--types` — For each path, show only its type before and after 1010 1011 Possible values: `true`, `false` 1012 1013* `--git` — Show a Git-format diff 1014 1015 Possible values: `true`, `false` 1016 1017* `--color-words` — Show a word-level diff with changes indicated only by color 1018 1019 Possible values: `true`, `false` 1020 1021* `--tool <TOOL>` — Generate diff by external command 1022* `--context <CONTEXT>` — Number of lines of context to show 1023 1024 1025 1026## `jj log` 1027 1028Show revision history 1029 1030Renders 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. 1031 1032Spans of revisions that are not included in the graph per `--revisions` are rendered as a synthetic node labeled "(elided revisions)". 1033 1034**Usage:** `jj log [OPTIONS] [PATHS]...` 1035 1036###### **Arguments:** 1037 1038* `<PATHS>` — Show revisions modifying the given paths 1039 1040###### **Options:** 1041 1042* `-r`, `--revisions <REVISIONS>` — Which revisions to show. If no paths nor revisions are specified, this defaults to the `revsets.log` setting, or `@ | ancestors(immutable_heads().., 2) | trunk()` if it is not set 1043* `--reversed` — Show revisions in the opposite order (older revisions first) 1044 1045 Possible values: `true`, `false` 1046 1047* `-l`, `--limit <LIMIT>` — Limit number of revisions to show 1048* `--no-graph` — Don't show the graph, show a flat list of revisions 1049 1050 Possible values: `true`, `false` 1051 1052* `-T`, `--template <TEMPLATE>` — Render each revision using the given template 1053* `-p`, `--patch` — Show patch 1054 1055 Possible values: `true`, `false` 1056 1057* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted 1058 1059 Possible values: `true`, `false` 1060 1061* `--stat` — Show a histogram of the changes 1062 1063 Possible values: `true`, `false` 1064 1065* `--types` — For each path, show only its type before and after 1066 1067 Possible values: `true`, `false` 1068 1069* `--git` — Show a Git-format diff 1070 1071 Possible values: `true`, `false` 1072 1073* `--color-words` — Show a word-level diff with changes indicated only by color 1074 1075 Possible values: `true`, `false` 1076 1077* `--tool <TOOL>` — Generate diff by external command 1078* `--context <CONTEXT>` — Number of lines of context to show 1079 1080 1081 1082## `jj move` 1083 1084Move changes from one revision into another 1085 1086Use `--interactive` to move only part of the source revision into the destination. The selected changes (or all the changes in the source revision if not using `--interactive`) will be moved into the destination. The changes will be removed from the source. If that means that the source is now empty compared to its parent, it will be abandoned. Without `--interactive`, the source change will always be empty. 1087 1088If the source became empty and both the source and destination had a non-empty description, you will be asked for the combined description. If either was empty, then the other one will be used. 1089 1090If 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. 1091 1092**Usage:** `jj move [OPTIONS] <--from <FROM>|--to <TO>> [PATHS]...` 1093 1094###### **Arguments:** 1095 1096* `<PATHS>` — Move only changes to these paths (instead of all paths) 1097 1098###### **Options:** 1099 1100* `-f`, `--from <FROM>` — Move part of this change into the destination 1101* `-t`, `--to <TO>` — Move part of the source into this change 1102* `-i`, `--interactive` — Interactively choose which parts to move 1103 1104 Possible values: `true`, `false` 1105 1106* `--tool <NAME>` — Specify diff editor to be used (implies --interactive) 1107 1108 1109 1110## `jj new` 1111 1112Create a new, empty change and (by default) edit it in the working copy 1113 1114By default, `jj` will edit the new change, making the working copy represent the new commit. This can be avoided with `--no-edit`. 1115 1116Note that you can create a merge commit by specifying multiple revisions as argument. For example, `jj new main @` will create a new commit with the `main` branch and the working copy as parents. 1117 1118For more information, see https://github.com/martinvonz/jj/blob/main/docs/working-copy.md. 1119 1120**Usage:** `jj new [OPTIONS] [REVISIONS]...` 1121 1122###### **Arguments:** 1123 1124* `<REVISIONS>` — Parent(s) of the new change 1125 1126 Default value: `@` 1127 1128###### **Options:** 1129 1130* `-r` — Ignored (but lets you pass `-r` for consistency with other commands) 1131* `-m`, `--message <MESSAGE>` — The change description to use 1132* `-L`, `--allow-large-revsets` — Deprecated. Please prefix the revset with `all:` instead 1133 1134 Possible values: `true`, `false` 1135 1136* `--no-edit` — Do not edit the newly created change 1137 1138 Possible values: `true`, `false` 1139 1140* `--edit` — No-op flag to pair with --no-edit 1141 1142 Possible values: `true`, `false` 1143 1144* `-A`, `--insert-after` — Insert the new change between the target commit(s) and their children 1145 1146 Possible values: `true`, `false` 1147 1148* `-B`, `--insert-before` — Insert the new change between the target commit(s) and their parents 1149 1150 Possible values: `true`, `false` 1151 1152 1153 1154 1155## `jj next` 1156 1157Move the working-copy commit to the child revision 1158 1159The command creates a new empty working copy revision that is the child of a 1160descendant `offset` revisions ahead of the parent of the current working 1161copy. 1162 1163For example, when the offset is 1: 1164 1165```text 1166D D @ 1167| |/ 1168C @ => C 1169|/ | 1170B B 1171``` 1172 1173If `--edit` is passed, the working copy revision is changed to the child of 1174the current working copy revision. 1175 1176```text 1177D D 1178| | 1179C C 1180| | 1181B => @ 1182| | 1183@ A 1184``` 1185If your working-copy commit already has visible children, then `--edit` is 1186implied. 1187 1188**Usage:** `jj next [OPTIONS] [OFFSET]` 1189 1190###### **Arguments:** 1191 1192* `<OFFSET>` — How many revisions to move forward. Advances to the next child by default 1193 1194 Default value: `1` 1195 1196###### **Options:** 1197 1198* `-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`) 1199 1200 Possible values: `true`, `false` 1201 1202 1203 1204 1205## `jj obslog` 1206 1207Show how a change has evolved over time 1208 1209Lists the previous commits which a change has pointed to. The current commit of a change evolves when the change is updated, rebased, etc. 1210 1211Name is derived from Merciual's obsolescence markers. 1212 1213**Usage:** `jj obslog [OPTIONS]` 1214 1215###### **Options:** 1216 1217* `-r`, `--revision <REVISION>` 1218 1219 Default value: `@` 1220* `-l`, `--limit <LIMIT>` — Limit number of revisions to show 1221* `--no-graph` — Don't show the graph, show a flat list of revisions 1222 1223 Possible values: `true`, `false` 1224 1225* `-T`, `--template <TEMPLATE>` — Render each revision using the given template 1226* `-p`, `--patch` — Show patch compared to the previous version of this change 1227 1228 Possible values: `true`, `false` 1229 1230* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted 1231 1232 Possible values: `true`, `false` 1233 1234* `--stat` — Show a histogram of the changes 1235 1236 Possible values: `true`, `false` 1237 1238* `--types` — For each path, show only its type before and after 1239 1240 Possible values: `true`, `false` 1241 1242* `--git` — Show a Git-format diff 1243 1244 Possible values: `true`, `false` 1245 1246* `--color-words` — Show a word-level diff with changes indicated only by color 1247 1248 Possible values: `true`, `false` 1249 1250* `--tool <TOOL>` — Generate diff by external command 1251* `--context <CONTEXT>` — Number of lines of context to show 1252 1253 1254 1255## `jj operation` 1256 1257Commands for working with the operation log 1258 1259For information about the operation log, see https://github.com/martinvonz/jj/blob/main/docs/operation-log.md. 1260 1261**Usage:** `jj operation <COMMAND>` 1262 1263###### **Subcommands:** 1264 1265* `abandon` — Abandon operation history 1266* `log` — Show the operation log 1267* `undo` — Create a new operation that undoes an earlier operation 1268* `restore` — Create a new operation that restores the repo to an earlier state 1269 1270 1271 1272## `jj operation abandon` 1273 1274Abandon operation history 1275 1276To 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. 1277 1278To discard recent operations, use `jj op restore <operation ID>` followed by `jj op abandon <operation ID>..@-`. 1279 1280The abandoned operations, commits, and other unreachable objects can later be garbage collected by using `jj util gc` command. 1281 1282**Usage:** `jj operation abandon <OPERATION>` 1283 1284###### **Arguments:** 1285 1286* `<OPERATION>` — The operation or operation range to abandon 1287 1288 1289 1290## `jj operation log` 1291 1292Show the operation log 1293 1294**Usage:** `jj operation log [OPTIONS]` 1295 1296###### **Options:** 1297 1298* `-l`, `--limit <LIMIT>` — Limit number of operations to show 1299* `--no-graph` — Don't show the graph, show a flat list of operations 1300 1301 Possible values: `true`, `false` 1302 1303* `-T`, `--template <TEMPLATE>` — Render each operation using the given template 1304 1305 1306 1307## `jj operation undo` 1308 1309Create a new operation that undoes an earlier operation 1310 1311This undoes an individual operation by applying the inverse of the operation. 1312 1313**Usage:** `jj operation undo [OPTIONS] [OPERATION]` 1314 1315###### **Arguments:** 1316 1317* `<OPERATION>` — The operation to undo 1318 1319 Default value: `@` 1320 1321###### **Options:** 1322 1323* `--what <WHAT>` — What portions of the local state to restore (can be repeated) 1324 1325 Default values: `repo`, `remote-tracking` 1326 1327 Possible values: 1328 - `repo`: 1329 The jj repo state and local branches 1330 - `remote-tracking`: 1331 The remote-tracking branches. Do not restore these if you'd like to push after the undo 1332 1333 1334 1335 1336## `jj operation restore` 1337 1338Create a new operation that restores the repo to an earlier state 1339 1340This restores the repo to the state at the specified operation, effectively undoing all later operations. It does so by creating a new operation. 1341 1342**Usage:** `jj operation restore [OPTIONS] <OPERATION>` 1343 1344###### **Arguments:** 1345 1346* `<OPERATION>` — The operation to restore to 1347 1348###### **Options:** 1349 1350* `--what <WHAT>` — What portions of the local state to restore (can be repeated) 1351 1352 Default values: `repo`, `remote-tracking` 1353 1354 Possible values: 1355 - `repo`: 1356 The jj repo state and local branches 1357 - `remote-tracking`: 1358 The remote-tracking branches. Do not restore these if you'd like to push after the undo 1359 1360 1361 1362 1363## `jj parallelize` 1364 1365Parallelize revisions by making them siblings 1366 1367Running `jj parallelize 1::2` will transform the history like this: 1368```text 13693 1370| 3 13712 / \ 1372| -> 1 2 13731 \ / 1374| 0 13750 1376``` 1377 1378The command effectively says "these revisions are actually independent", 1379meaning that they should no longer be ancestors/descendants of each other. 1380However, revisions outside the set that were previously ancestors of a 1381revision in the set will remain ancestors of it. For example, revision 0 1382above remains an ancestor of both 1 and 2. Similarly, 1383revisions outside the set that were previously descendants of a revision 1384in the set will remain descendants of it. For example, revision 3 above 1385remains a descendant of both 1 and 2. 1386 1387Therefore, `jj parallelize '1 | 3'` is a no-op. That's because 2, which is 1388not in the target set, was a descendant of 1 before, so it remains a 1389descendant, and it was an ancestor of 3 before, so it remains an ancestor. 1390 1391**Usage:** `jj parallelize [REVISIONS]...` 1392 1393###### **Arguments:** 1394 1395* `<REVISIONS>` — Revisions to parallelize 1396 1397 1398 1399## `jj prev` 1400 1401Change the working copy revision relative to the parent revision 1402 1403The command creates a new empty working copy revision that is the child of 1404an ancestor `offset` revisions behind the parent of the current working 1405copy. 1406 1407For example, when the offset is 1: 1408 1409```text 1410D @ D 1411|/ | 1412A => A @ 1413| |/ 1414B B 1415``` 1416 1417If `--edit` is passed, the working copy revision is changed to the parent of 1418the current working copy revision. 1419 1420```text 1421D @ D 1422|/ | 1423C => @ 1424| | 1425B B 1426| | 1427A A 1428``` 1429If the working copy revision already has visible children, then `--edit` is 1430implied. 1431 1432**Usage:** `jj prev [OPTIONS] [OFFSET]` 1433 1434###### **Arguments:** 1435 1436* `<OFFSET>` — How many revisions to move backward. Moves to the parent by default 1437 1438 Default value: `1` 1439 1440###### **Options:** 1441 1442* `-e`, `--edit` — Edit the parent directly, instead of moving the working-copy commit 1443 1444 Possible values: `true`, `false` 1445 1446 1447 1448 1449## `jj rebase` 1450 1451Move revisions to different parent(s) 1452 1453There are three different ways of specifying which revisions to rebase: 1454`-b` to rebase a whole branch, `-s` to rebase a revision and its 1455descendants, and `-r` to rebase a single commit. If none of them is 1456specified, it defaults to `-b @`. 1457 1458With `-s`, the command rebases the specified revision and its descendants 1459onto the destination. For example, `jj rebase -s M -d O` would transform 1460your history like this (letters followed by an apostrophe are post-rebase 1461versions): 1462 1463```text 1464O N' 1465| | 1466| N M' 1467| | | 1468| M O 1469| | => | 1470| | L | L 1471| |/ | | 1472| K | K 1473|/ |/ 1474J J 1475``` 1476 1477With `-b`, the command rebases the whole "branch" containing the specified 1478revision. A "branch" is the set of commits that includes: 1479 1480* the specified revision and ancestors that are not also ancestors of the 1481 destination 1482* all descendants of those commits 1483 1484In other words, `jj rebase -b X -d Y` rebases commits in the revset 1485`(Y..X)::` (which is equivalent to `jj rebase -s 'roots(Y..X)' -d Y` for a 1486single root). For example, either `jj rebase -b L -d O` or `jj rebase -b M 1487-d O` would transform your history like this (because `L` and `M` are on the 1488same "branch", relative to the destination): 1489 1490```text 1491O N' 1492| | 1493| N M' 1494| | | 1495| M | L' 1496| | => |/ 1497| | L K' 1498| |/ | 1499| K O 1500|/ | 1501J J 1502``` 1503 1504With `-r`, the command rebases only the specified revisions onto the 1505destination. Any "hole" left behind will be filled by rebasing descendants 1506onto the specified revision's parent(s). For example, `jj rebase -r K -d M` 1507would transform your history like this: 1508 1509```text 1510M K' 1511| | 1512| L M 1513| | => | 1514| K | L' 1515|/ |/ 1516J J 1517``` 1518 1519Note that you can create a merge commit by repeating the `-d` argument. 1520For example, if you realize that commit L actually depends on commit M in 1521order to work (in addition to its current parent K), you can run `jj rebase 1522-s L -d K -d M`: 1523 1524```text 1525M L' 1526| |\ 1527| L M | 1528| | => | | 1529| K | K 1530|/ |/ 1531J J 1532``` 1533 1534If a working-copy commit gets abandoned, it will be given a new, empty 1535commit. This is true in general; it is not specific to this command. 1536 1537**Usage:** `jj rebase [OPTIONS] <--destination <DESTINATION>|--insert-after <INSERT_AFTER>|--insert-before <INSERT_BEFORE>>` 1538 1539###### **Options:** 1540 1541* `-b`, `--branch <BRANCH>` — Rebase the whole branch relative to destination's ancestors (can be repeated) 1542* `-s`, `--source <SOURCE>` — Rebase specified revision(s) together with their trees of descendants (can be repeated) 1543* `-r`, `--revisions <REVISIONS>` — Rebase the given revisions, rebasing descendants onto this revision's parent(s) 1544* `-d`, `--destination <DESTINATION>` — The revision(s) to rebase onto (can be repeated to create a merge commit) 1545* `-A`, `--insert-after <INSERT_AFTER>` — The revision(s) to insert after (can be repeated to create a merge commit) 1546* `-B`, `--insert-before <INSERT_BEFORE>` — The revision(s) to insert before (can be repeated to create a merge commit) 1547* `--skip-empty` — 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 1548 1549 Possible values: `true`, `false` 1550 1551* `-L`, `--allow-large-revsets` — Deprecated. Please prefix the revset with `all:` instead 1552 1553 Possible values: `true`, `false` 1554 1555 1556 1557 1558## `jj resolve` 1559 1560Resolve a conflicted file with an external merge tool 1561 1562Only conflicts that can be resolved with a 3-way merge are supported. See docs for merge tool configuration instructions. 1563 1564Note 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. 1565 1566**Usage:** `jj resolve [OPTIONS] [PATHS]...` 1567 1568###### **Arguments:** 1569 1570* `<PATHS>` — Restrict to these paths when searching for a conflict to resolve. We will attempt to resolve the first conflict we can find. You can use the `--list` argument to find paths to use here 1571 1572###### **Options:** 1573 1574* `-r`, `--revision <REVISION>` 1575 1576 Default value: `@` 1577* `-l`, `--list` — Instead of resolving one conflict, list all the conflicts 1578 1579 Possible values: `true`, `false` 1580 1581* `--tool <NAME>` — Specify 3-way merge tool to be used 1582 1583 1584 1585## `jj restore` 1586 1587Restore paths from another revision 1588 1589That 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>`). 1590 1591If only one of `--from` or `--to` is specified, the other one defaults to the working copy. 1592 1593When 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. 1594 1595See `jj diffedit` if you'd like to restore portions of files rather than entire files. 1596 1597**Usage:** `jj restore [OPTIONS] [PATHS]...` 1598 1599###### **Arguments:** 1600 1601* `<PATHS>` — Restore only these paths (instead of all paths) 1602 1603###### **Options:** 1604 1605* `--from <FROM>` — Revision to restore from (source) 1606* `--to <TO>` — Revision to restore into (destination) 1607* `-c`, `--changes-in <REVISION>` — Undo the changes in a revision as compared to the merge of its parents 1608* `-r`, `--revision <REVISION>` — Prints an error. DO NOT USE 1609 1610 1611 1612## `jj root` 1613 1614Show the current workspace root directory 1615 1616**Usage:** `jj root` 1617 1618 1619 1620## `jj show` 1621 1622Show commit description and changes in a revision 1623 1624**Usage:** `jj show [OPTIONS] [REVISION]` 1625 1626###### **Arguments:** 1627 1628* `<REVISION>` — Show changes in this revision, compared to its parent(s) 1629 1630 Default value: `@` 1631 1632###### **Options:** 1633 1634* `-r` — Ignored (but lets you pass `-r` for consistency with other commands) 1635 1636 Possible values: `true`, `false` 1637 1638* `-T`, `--template <TEMPLATE>` — Render a revision using the given template 1639* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted 1640 1641 Possible values: `true`, `false` 1642 1643* `--stat` — Show a histogram of the changes 1644 1645 Possible values: `true`, `false` 1646 1647* `--types` — For each path, show only its type before and after 1648 1649 Possible values: `true`, `false` 1650 1651* `--git` — Show a Git-format diff 1652 1653 Possible values: `true`, `false` 1654 1655* `--color-words` — Show a word-level diff with changes indicated only by color 1656 1657 Possible values: `true`, `false` 1658 1659* `--tool <TOOL>` — Generate diff by external command 1660* `--context <CONTEXT>` — Number of lines of context to show 1661 1662 1663 1664## `jj sparse` 1665 1666Manage which paths from the working-copy commit are present in the working copy 1667 1668**Usage:** `jj sparse <COMMAND>` 1669 1670###### **Subcommands:** 1671 1672* `list` — List the patterns that are currently present in the working copy 1673* `set` — Update the patterns that are present in the working copy 1674* `reset` — Reset the patterns to include all files in the working copy 1675* `edit` — Start an editor to update the patterns that are present in the working copy 1676 1677 1678 1679## `jj sparse list` 1680 1681List the patterns that are currently present in the working copy 1682 1683By 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). 1684 1685**Usage:** `jj sparse list` 1686 1687 1688 1689## `jj sparse set` 1690 1691Update the patterns that are present in the working copy 1692 1693For 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`. 1694 1695**Usage:** `jj sparse set [OPTIONS]` 1696 1697###### **Options:** 1698 1699* `--add <ADD>` — Patterns to add to the working copy 1700* `--remove <REMOVE>` — Patterns to remove from the working copy 1701* `--clear` — Include no files in the working copy (combine with --add) 1702 1703 Possible values: `true`, `false` 1704 1705 1706 1707 1708## `jj sparse reset` 1709 1710Reset the patterns to include all files in the working copy 1711 1712**Usage:** `jj sparse reset` 1713 1714 1715 1716## `jj sparse edit` 1717 1718Start an editor to update the patterns that are present in the working copy 1719 1720**Usage:** `jj sparse edit` 1721 1722 1723 1724## `jj split` 1725 1726Split a revision in two 1727 1728Starts 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 first revision. Once you close the editor, your edited content will replace the previous revision. The remaining changes will be put in a new revision on top. 1729 1730[diff editor]: https://martinvonz.github.io/jj/latest/config/#editing-diffs 1731 1732If the change you split had a description, you will be asked to enter a change description for each commit. If the change did not have a description, the second part will not get a description, and you will be asked for a description only for the first part. 1733 1734**Usage:** `jj split [OPTIONS] [PATHS]...` 1735 1736###### **Arguments:** 1737 1738* `<PATHS>` — Put these paths in the first commit 1739 1740###### **Options:** 1741 1742* `-i`, `--interactive` — Interactively choose which parts to split. This is the default if no paths are provided 1743 1744 Possible values: `true`, `false` 1745 1746* `--tool <NAME>` — Specify diff editor to be used (implies --interactive) 1747* `-r`, `--revision <REVISION>` — The revision to split 1748 1749 Default value: `@` 1750* `-s`, `--siblings` — Split the revision into two siblings instead of a parent and child 1751 1752 Possible values: `true`, `false` 1753 1754 1755 1756 1757## `jj squash` 1758 1759Move changes from a revision into another revision 1760 1761With 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). 1762 1763With 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. 1764 1765If, after moving changes out, the source revision is empty compared to its parent(s), it will be abandoned. Without `--interactive`, the source revision will always be empty. 1766 1767If the source became empty and both the source and destination had a non-empty description, you will be asked for the combined description. If either was empty, then the other one will be used. 1768 1769If 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. 1770 1771**Usage:** `jj squash [OPTIONS] [PATHS]...` 1772 1773###### **Arguments:** 1774 1775* `<PATHS>` — Move only changes to these paths (instead of all paths) 1776 1777###### **Options:** 1778 1779* `-r`, `--revision <REVISION>` — Revision to squash into its parent (default: @) 1780* `--from <FROM>` — Revision(s) to squash from (default: @) 1781* `--into <INTO>` — Revision to squash into (default: @) 1782* `-m`, `--message <MESSAGE>` — The description to use for squashed revision (don't open editor) 1783* `-u`, `--use-destination-message` — Use the description of the destination revision and discard the description(s) of the source revision(s) 1784 1785 Possible values: `true`, `false` 1786 1787* `-i`, `--interactive` — Interactively choose which parts to squash 1788 1789 Possible values: `true`, `false` 1790 1791* `--tool <NAME>` — Specify diff editor to be used (implies --interactive) 1792 1793 1794 1795## `jj status` 1796 1797Show high-level repo status 1798 1799This includes: 1800 1801* The working copy commit and its (first) parent, and a summary of the changes between them 1802 1803* Conflicted branches (see https://github.com/martinvonz/jj/blob/main/docs/branches.md) 1804 1805**Usage:** `jj status [PATHS]...` 1806 1807###### **Arguments:** 1808 1809* `<PATHS>` — Restrict the status display to these paths 1810 1811 1812 1813## `jj tag` 1814 1815Manage tags 1816 1817**Usage:** `jj tag <COMMAND>` 1818 1819###### **Subcommands:** 1820 1821* `list` — List tags 1822 1823 1824 1825## `jj tag list` 1826 1827List tags 1828 1829**Usage:** `jj tag list [OPTIONS] [NAMES]...` 1830 1831###### **Arguments:** 1832 1833* `<NAMES>` — Show tags whose local name matches 1834 1835###### **Options:** 1836 1837* `-T`, `--template <TEMPLATE>` — Render each tag using the given template 1838 1839 1840 1841## `jj util` 1842 1843Infrequently used commands such as for generating shell completions 1844 1845**Usage:** `jj util <COMMAND>` 1846 1847###### **Subcommands:** 1848 1849* `completion` — Print a command-line-completion script 1850* `gc` — Run backend-dependent garbage collection 1851* `mangen` — Print a ROFF (manpage) 1852* `markdown-help` — Print the CLI help for all subcommands in Markdown 1853* `config-schema` — Print the JSON schema for the jj TOML config format 1854 1855 1856 1857## `jj util completion` 1858 1859Print a command-line-completion script 1860 1861Apply it by running one of these: 1862 1863- **bash**: `source <(jj util completion bash)` 1864- **fish**: `jj util completion fish | source` 1865- **nushell**: 1866 ```nu 1867 jj util completion nushell | save "completions-jj.nu" 1868 use "completions-jj.nu" * # Or `source "completions-jj.nu"` 1869 ``` 1870- **zsh**: 1871 ```shell 1872 autoload -U compinit 1873 compinit 1874 source <(jj util completion zsh) 1875 ``` 1876 1877**Usage:** `jj util completion [SHELL]` 1878 1879###### **Arguments:** 1880 1881* `<SHELL>` 1882 1883 Possible values: `bash`, `elvish`, `fish`, `nushell`, `power-shell`, `zsh` 1884 1885 1886###### **Options:** 1887 1888* `--bash` — Deprecated. Use the SHELL positional argument instead 1889 1890 Possible values: `true`, `false` 1891 1892* `--fish` — Deprecated. Use the SHELL positional argument instead 1893 1894 Possible values: `true`, `false` 1895 1896* `--zsh` — Deprecated. Use the SHELL positional argument instead 1897 1898 Possible values: `true`, `false` 1899 1900 1901 1902 1903## `jj util gc` 1904 1905Run backend-dependent garbage collection 1906 1907**Usage:** `jj util gc [OPTIONS]` 1908 1909###### **Options:** 1910 1911* `--expire <EXPIRE>` — Time threshold 1912 1913 1914 1915## `jj util mangen` 1916 1917Print a ROFF (manpage) 1918 1919**Usage:** `jj util mangen` 1920 1921 1922 1923## `jj util markdown-help` 1924 1925Print the CLI help for all subcommands in Markdown 1926 1927**Usage:** `jj util markdown-help` 1928 1929 1930 1931## `jj util config-schema` 1932 1933Print the JSON schema for the jj TOML config format 1934 1935**Usage:** `jj util config-schema` 1936 1937 1938 1939## `jj undo` 1940 1941Undo an operation (shortcut for `jj op undo`) 1942 1943**Usage:** `jj undo [OPTIONS] [OPERATION]` 1944 1945###### **Arguments:** 1946 1947* `<OPERATION>` — The operation to undo 1948 1949 Default value: `@` 1950 1951###### **Options:** 1952 1953* `--what <WHAT>` — What portions of the local state to restore (can be repeated) 1954 1955 Default values: `repo`, `remote-tracking` 1956 1957 Possible values: 1958 - `repo`: 1959 The jj repo state and local branches 1960 - `remote-tracking`: 1961 The remote-tracking branches. Do not restore these if you'd like to push after the undo 1962 1963 1964 1965 1966## `jj unsquash` 1967 1968Move changes from a revision's parent into the revision 1969 1970After moving the changes out of the parent, the child revision will have the same content state as before. If moving the change out of the parent change made it empty compared to its parent, it will be abandoned. Without `--interactive`, the parent change will always become empty. 1971 1972If the source became empty and both the source and destination had a non-empty description, you will be asked for the combined description. If either was empty, then the other one will be used. 1973 1974If 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. 1975 1976**Usage:** `jj unsquash [OPTIONS]` 1977 1978###### **Options:** 1979 1980* `-r`, `--revision <REVISION>` 1981 1982 Default value: `@` 1983* `-i`, `--interactive` — Interactively choose which parts to unsquash 1984 1985 Possible values: `true`, `false` 1986 1987* `--tool <NAME>` — Specify diff editor to be used (implies --interactive) 1988 1989 1990 1991## `jj untrack` 1992 1993Stop tracking specified paths in the working copy 1994 1995**Usage:** `jj untrack <PATHS>...` 1996 1997###### **Arguments:** 1998 1999* `<PATHS>` — Paths to untrack. They must already be ignored 2000 2001 2002 2003## `jj version` 2004 2005Display version information 2006 2007**Usage:** `jj version` 2008 2009 2010 2011## `jj workspace` 2012 2013Commands for working with workspaces 2014 2015Workspaces 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. 2016 2017Each 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`. 2018 2019Each workspace also has own sparse patterns. 2020 2021**Usage:** `jj workspace <COMMAND>` 2022 2023###### **Subcommands:** 2024 2025* `add` — Add a workspace 2026* `forget` — Stop tracking a workspace's working-copy commit in the repo 2027* `list` — List workspaces 2028* `root` — Show the current workspace root directory 2029* `update-stale` — Update a workspace that has become stale 2030 2031 2032 2033## `jj workspace add` 2034 2035Add a workspace 2036 2037Sparse patterns will be copied over from the current workspace. 2038 2039**Usage:** `jj workspace add [OPTIONS] <DESTINATION>` 2040 2041###### **Arguments:** 2042 2043* `<DESTINATION>` — Where to create the new workspace 2044 2045###### **Options:** 2046 2047* `--name <NAME>` — A name for the workspace 2048* `-r`, `--revision <REVISION>` — A list of parent revisions for the working-copy commit of the newly created workspace. You may specify nothing, or any number of parents 2049 2050 2051 2052## `jj workspace forget` 2053 2054Stop tracking a workspace's working-copy commit in the repo 2055 2056The workspace will not be touched on disk. It can be deleted from disk before or after running this command. 2057 2058**Usage:** `jj workspace forget [WORKSPACES]...` 2059 2060###### **Arguments:** 2061 2062* `<WORKSPACES>` — Names of the workspaces to forget. By default, forgets only the current workspace 2063 2064 2065 2066## `jj workspace list` 2067 2068List workspaces 2069 2070**Usage:** `jj workspace list` 2071 2072 2073 2074## `jj workspace root` 2075 2076Show the current workspace root directory 2077 2078**Usage:** `jj workspace root` 2079 2080 2081 2082## `jj workspace update-stale` 2083 2084Update a workspace that has become stale 2085 2086For information about stale working copies, see https://github.com/martinvonz/jj/blob/main/docs/working-copy.md. 2087 2088**Usage:** `jj workspace update-stale` 2089 2090 2091 2092<hr/> 2093 2094<small><i> 2095 This document was generated automatically by 2096 <a href="https://crates.io/crates/clap-markdown"><code>clap-markdown</code></a>. 2097</i></small>