--- source: cli/tests/test_generate_md_cli_help.rs description: "AUTO-GENERATED FILE, DO NOT EDIT. This cli reference is generated as an `insta` snapshot. MkDocs follows they symlink from docs/cli-reference.md to the snap. Unfortunately, `insta` unavoidably creates this header. Luckily, MkDocs ignores the header since it has the same format as Markdown headers. TODO: MkDocs may fail on Windows if symlinks are not enabled in the OS settings" --- # Command-Line Help for `jj` This document contains the help content for the `jj` command-line program. **Command Overview:** * [`jj`↴](#jj) * [`jj abandon`↴](#jj-abandon) * [`jj backout`↴](#jj-backout) * [`jj branch`↴](#jj-branch) * [`jj branch create`↴](#jj-branch-create) * [`jj branch delete`↴](#jj-branch-delete) * [`jj branch forget`↴](#jj-branch-forget) * [`jj branch list`↴](#jj-branch-list) * [`jj branch rename`↴](#jj-branch-rename) * [`jj branch set`↴](#jj-branch-set) * [`jj branch track`↴](#jj-branch-track) * [`jj branch untrack`↴](#jj-branch-untrack) * [`jj cat`↴](#jj-cat) * [`jj chmod`↴](#jj-chmod) * [`jj commit`↴](#jj-commit) * [`jj config`↴](#jj-config) * [`jj config list`↴](#jj-config-list) * [`jj config get`↴](#jj-config-get) * [`jj config set`↴](#jj-config-set) * [`jj config edit`↴](#jj-config-edit) * [`jj config path`↴](#jj-config-path) * [`jj describe`↴](#jj-describe) * [`jj diff`↴](#jj-diff) * [`jj diffedit`↴](#jj-diffedit) * [`jj duplicate`↴](#jj-duplicate) * [`jj edit`↴](#jj-edit) * [`jj files`↴](#jj-files) * [`jj git`↴](#jj-git) * [`jj git remote`↴](#jj-git-remote) * [`jj git remote add`↴](#jj-git-remote-add) * [`jj git remote remove`↴](#jj-git-remote-remove) * [`jj git remote rename`↴](#jj-git-remote-rename) * [`jj git remote list`↴](#jj-git-remote-list) * [`jj git init`↴](#jj-git-init) * [`jj git fetch`↴](#jj-git-fetch) * [`jj git clone`↴](#jj-git-clone) * [`jj git push`↴](#jj-git-push) * [`jj git import`↴](#jj-git-import) * [`jj git export`↴](#jj-git-export) * [`jj init`↴](#jj-init) * [`jj interdiff`↴](#jj-interdiff) * [`jj log`↴](#jj-log) * [`jj move`↴](#jj-move) * [`jj new`↴](#jj-new) * [`jj next`↴](#jj-next) * [`jj obslog`↴](#jj-obslog) * [`jj operation`↴](#jj-operation) * [`jj operation abandon`↴](#jj-operation-abandon) * [`jj operation log`↴](#jj-operation-log) * [`jj operation undo`↴](#jj-operation-undo) * [`jj operation restore`↴](#jj-operation-restore) * [`jj prev`↴](#jj-prev) * [`jj rebase`↴](#jj-rebase) * [`jj resolve`↴](#jj-resolve) * [`jj restore`↴](#jj-restore) * [`jj root`↴](#jj-root) * [`jj show`↴](#jj-show) * [`jj sparse`↴](#jj-sparse) * [`jj sparse list`↴](#jj-sparse-list) * [`jj sparse set`↴](#jj-sparse-set) * [`jj sparse reset`↴](#jj-sparse-reset) * [`jj sparse edit`↴](#jj-sparse-edit) * [`jj split`↴](#jj-split) * [`jj squash`↴](#jj-squash) * [`jj status`↴](#jj-status) * [`jj tag`↴](#jj-tag) * [`jj tag list`↴](#jj-tag-list) * [`jj util`↴](#jj-util) * [`jj util completion`↴](#jj-util-completion) * [`jj util gc`↴](#jj-util-gc) * [`jj util mangen`↴](#jj-util-mangen) * [`jj util markdown-help`↴](#jj-util-markdown-help) * [`jj util config-schema`↴](#jj-util-config-schema) * [`jj undo`↴](#jj-undo) * [`jj unsquash`↴](#jj-unsquash) * [`jj untrack`↴](#jj-untrack) * [`jj version`↴](#jj-version) * [`jj workspace`↴](#jj-workspace) * [`jj workspace add`↴](#jj-workspace-add) * [`jj workspace forget`↴](#jj-workspace-forget) * [`jj workspace list`↴](#jj-workspace-list) * [`jj workspace root`↴](#jj-workspace-root) * [`jj workspace update-stale`↴](#jj-workspace-update-stale) ## `jj` Jujutsu (An experimental VCS) To get started, see the tutorial at https://github.com/martinvonz/jj/blob/main/docs/tutorial.md. **Usage:** `jj [OPTIONS] [COMMAND]` ###### **Subcommands:** * `abandon` — Abandon a revision * `backout` — Apply the reverse of a revision on top of another revision * `branch` — Manage branches * `cat` — Print contents of a file in a revision * `chmod` — Sets or removes the executable bit for paths in the repo * `commit` — Update the description and create a new change on top * `config` — Manage config options * `describe` — Update the change description or other metadata * `diff` — Compare file contents between two revisions * `diffedit` — Touch up the content changes in a revision with a diff editor * `duplicate` — Create a new change with the same content as an existing one * `edit` — Sets the specified revision as the working-copy revision * `files` — List files in a revision * `git` — Commands for working with the underlying Git repo * `init` — Create a new repo in the given directory * `interdiff` — Compare the changes of two commits * `log` — Show revision history * `move` — Move changes from one revision into another * `new` — Create a new, empty change and (by default) edit it in the working copy * `next` — Move the working-copy commit to the child revision * `obslog` — Show how a change has evolved * `operation` — Commands for working with the operation log * `prev` — Move the working-copy commit to the parent revision * `rebase` — Move revisions to different parent(s) * `resolve` — Resolve a conflicted file with an external merge tool * `restore` — Restore paths from another revision * `root` — Show the current workspace root directory * `show` — Show commit description and changes in a revision * `sparse` — Manage which paths from the working-copy commit are present in the working copy * `split` — Split a revision in two * `squash` — Move changes from a revision into another revision * `status` — Show high-level repo status * `tag` — Manage tags * `util` — Infrequently used commands such as for generating shell completions * `undo` — Undo an operation (shortcut for `jj op undo`) * `unsquash` — Move changes from a revision's parent into the revision * `untrack` — Stop tracking specified paths in the working copy * `version` — Display version information * `workspace` — Commands for working with workspaces ###### **Options:** * `-R`, `--repository ` — Path to repository to operate on * `--ignore-working-copy` — Don't snapshot the working copy, and don't update it Possible values: `true`, `false` * `--at-operation ` — Operation to load the repo at Default value: `@` * `--debug` — Enable debug logging Possible values: `true`, `false` * `--color ` — When to colorize output (always, never, auto) * `--no-pager` — Disable the pager Possible values: `true`, `false` * `--config-toml ` — Additional configuration options (can be repeated) ## `jj abandon` Abandon a revision Abandon a revision, rebasing descendants onto its parent(s). The behavior is similar to `jj restore --changes-in`; the difference is that `jj abandon` gives you a new change, while `jj restore` updates the existing change. 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] [REVISIONS]...` ###### **Arguments:** * `` — The revision(s) to abandon Default value: `@` ###### **Options:** * `-s`, `--summary` — Do not print every abandoned commit on a separate line Possible values: `true`, `false` * `-r` — Ignored (but lets you pass `-r` for consistency with other commands) ## `jj backout` Apply the reverse of a revision on top of another revision **Usage:** `jj backout [OPTIONS]` ###### **Options:** * `-r`, `--revision ` — The revision to apply the reverse of Default value: `@` * `-d`, `--destination ` — The revision to apply the reverse changes on top of Default value: `@` ## `jj branch` Manage branches. For information about branches, see https://github.com/martinvonz/jj/blob/main/docs/branches.md. **Usage:** `jj branch ` ###### **Subcommands:** * `create` — Create a new branch * `delete` — Delete an existing branch and propagate the deletion to remotes on the next push * `forget` — Forget everything about a branch, including its local and remote targets * `list` — List branches and their targets * `rename` — Rename `old` branch name to `new` branch name * `set` — Update an existing branch to point to a certain commit * `track` — Start tracking given remote branches * `untrack` — Stop tracking given remote branches ## `jj branch create` Create a new branch **Usage:** `jj branch create [OPTIONS] ...` ###### **Arguments:** * `` — The branches to create ###### **Options:** * `-r`, `--revision ` — The branch's target revision ## `jj branch delete` Delete an existing branch and propagate the deletion to remotes on the next push **Usage:** `jj branch delete [NAMES]...` ###### **Arguments:** * `` — The branches to delete ###### **Options:** * `--glob ` — Deprecated. Please prefix the pattern with `glob:` instead ## `jj branch forget` Forget everything about a branch, including its local and remote targets. A forgotten branch will not impact remotes on future pushes. It will be recreated on future pulls if it still exists in the remote. **Usage:** `jj branch forget [NAMES]...` ###### **Arguments:** * `` — The branches to forget ###### **Options:** * `--glob ` — Deprecated. Please prefix the pattern with `glob:` instead ## `jj branch list` List branches and their targets By default, a tracking remote branch will be included only if its target is different from the local target. A non-tracking remote branch won't be listed. For a conflicted branch (both local and remote), old target revisions are preceded by a "-" and new target revisions are preceded by a "+". For information about branches, see https://github.com/martinvonz/jj/blob/main/docs/branches.md. **Usage:** `jj branch list [OPTIONS] [NAMES]...` ###### **Arguments:** * `` — Show branches whose local name matches ###### **Options:** * `-a`, `--all` — Show all tracking and non-tracking remote branches including the ones whose targets are synchronized with the local branches Possible values: `true`, `false` * `-t`, `--tracked` — Show remote tracked branches only. Omits local Git-tracking branches by default Possible values: `true`, `false` * `-c`, `--conflicted` — Show conflicted branches only Possible values: `true`, `false` * `-r`, `--revisions ` — Show branches whose local targets are in the given revisions ## `jj branch rename` Rename `old` branch name to `new` branch name. The new branch name points at the same commit as the old branch name. **Usage:** `jj branch rename ` ###### **Arguments:** * `` — The old name of the branch * `` — The new name of the branch ## `jj branch set` Update an existing branch to point to a certain commit **Usage:** `jj branch set [OPTIONS] ...` ###### **Arguments:** * `` — The branches to update ###### **Options:** * `-r`, `--revision ` — The branch's target revision * `-B`, `--allow-backwards` — Allow moving the branch backwards or sideways Possible values: `true`, `false` ## `jj branch track` Start tracking given remote branches A tracking remote branch will be imported as a local branch of the same name. Changes to it will propagate to the existing local branch on future pulls. **Usage:** `jj branch track ...` ###### **Arguments:** * `` — Remote branches to track ## `jj branch untrack` Stop tracking given remote branches A non-tracking remote branch is just a pointer to the last-fetched remote branch. It won't be imported as a local branch on future pulls. **Usage:** `jj branch untrack ...` ###### **Arguments:** * `` — Remote branches to untrack ## `jj cat` Print contents of a file in a revision **Usage:** `jj cat [OPTIONS] ` ###### **Arguments:** * `` — The file to print ###### **Options:** * `-r`, `--revision ` — The revision to get the file contents from Default value: `@` ## `jj chmod` Sets or removes the executable bit for paths in the repo Unlike the POSIX `chmod`, `jj chmod` also works on Windows, on conflicted files, and on arbitrary revisions. **Usage:** `jj chmod [OPTIONS] ...` ###### **Arguments:** * `` Possible values: - `n`: Make a path non-executable (alias: normal) - `x`: Make a path executable (alias: executable) * `` — Paths to change the executable bit for ###### **Options:** * `-r`, `--revision ` — The revision to update Default value: `@` ## `jj commit` Update the description and create a new change on top **Usage:** `jj commit [OPTIONS] [PATHS]...` ###### **Arguments:** * `` — Put these paths in the first commit ###### **Options:** * `-i`, `--interactive` — Interactively choose which changes to include in the first commit Possible values: `true`, `false` * `--tool ` — Specify diff editor to be used (implies --interactive) * `-m`, `--message ` — The change description to use (don't open editor) ## `jj config` Manage config options Operates on jj configuration, which comes from the config file and environment variables. For file locations, supported config options, and other details about jj config, see https://github.com/martinvonz/jj/blob/main/docs/config.md. **Usage:** `jj config ` ###### **Subcommands:** * `list` — List variables set in config file, along with their values * `get` — Get the value of a given config option. * `set` — Update config file to set the given option to a given value * `edit` — Start an editor on a jj config file * `path` — Print the path to the config file ## `jj config list` List variables set in config file, along with their values **Usage:** `jj config list [OPTIONS] [NAME]` ###### **Arguments:** * `` — An optional name of a specific config option to look up ###### **Options:** * `--include-defaults` — Whether to explicitly include built-in default values in the list Possible values: `true`, `false` * `--include-overridden` — Allow printing overridden values Possible values: `true`, `false` * `--user` — Target the user-level config Possible values: `true`, `false` * `--repo` — Target the repo-level config Possible values: `true`, `false` * `-T`, `--template