LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

jj

jujutsu, a Git-compatible version control system

TLDR

Initialize a new colocated Git/jj repository in the current directory
$ jj git init --colocate
copy
Clone a Git remote
$ jj git clone [https://github.com/owner/repo]
copy
Show working-copy status
$ jj status
copy
Show the revision graph
$ jj log
copy
Create a new (empty) change on top of the current one
$ jj new
copy
Describe the current change
$ jj describe -m "[message]"
copy
Squash the current change into its parent
$ jj squash
copy
Move a change to a new parent (rebase)
$ jj rebase -r [revision] -d [destination]
copy
Abandon the current change (drops its content, rebases descendants)
$ jj abandon
copy
Undo the last operation
$ jj undo
copy
Sync with the Git remote
$ jj git fetch && jj git push
copy

SYNOPSIS

jj [globaloptions] command [args_]

DESCRIPTION

jj (Jujutsu) is a Git-compatible distributed version control system. Every working-copy change is recorded as a first-class revision, conflicts are stored in commits rather than blocking operations, and there are no branches in the Git sense — instead every commit is reachable through the revision graph and human-friendly bookmarks can be attached to any revision.The default backend is Git, so a jj repo can be made colocated with a real Git repo (`jj git init --colocate`), letting Git tools and other developers continue to interact through plain Git while you use jj locally.

COMMON COMMANDS

git init [--colocate]

Initialize a new repository, optionally colocated with Git so both jj and git see the same working copy.
git clone url
Clone a Git remote into a jj repo.
status
Show high-level repository / working copy state.
log
Display the revision graph.
new [revisions...]
Create a new (empty) change on top of the given revisions; defaults to the current working-copy parent.
describe [-m message]
Edit the description (commit message) of a change.
edit revision
Move the working copy to an existing revision (replaces "checkout" thinking).
squash [--from rev] [--into rev]
Move changes from one revision into another (default: current → its parent).
rebase -r rev -d dest
Move a revision (and optionally its descendants) onto a new destination.
abandon [revision]
Drop a change; descendants are rebased onto the parent.
undo
Revert the last operation. Combine with jj op log and jj op restore for finer control.
bookmark subcommand
Manage named references (jj's equivalent of Git branches): create, move, delete, track, untrack, list.
git subcommand
Git interop: fetch, push, import, export, remote.
op log, op restore
Inspect and roll back the operation log (every command is recorded).

GLOBAL OPTIONS

-R, --repository PATH

Operate on the repository at PATH.
--at-operation OP, --at-op OP
Run the command at a previous operation in the operation log (read-only views).
--no-pager
Disable the pager for this invocation.
--config-toml TOML
Inline configuration overrides.

CAVEATS

The CLI is still pre-1.0 and changing — the bookmark subcommand was renamed from branch in 0.18, and many flags continue to evolve. jj git push by default pushes only the bookmarks that match the local working revisions; explicit pushes use --bookmark name or --all-bookmarks. Conflicts are stored on disk but the tooling around resolving them is still young.

HISTORY

Jujutsu was created in 2019 at Google by Martin von Zweigbergk as a personal experiment, open-sourced in 2022, and is now developed at github.com/jj-vcs/jj with a growing community of contributors.

SEE ALSO

jj-git(1), jj-log(1), git(1), hg(1)

Copied to clipboard
Kai