← 返回命令列表

Linux command

jj 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Initialize a new colocated Git/jj repository

jj git init --colocate

Clone a Git remote

jj git clone [https://github.com/owner/repo]

Show working-copy status

jj status

Show the revision graph

jj log

Create a new (empty) change on top of the current one

jj new

Describe the current change

jj describe -m "[message]"

Squash the current change into its parent

jj squash

Move a change to a new parent (rebase)

jj rebase -r [revision] -d [destination]

Abandon the current change

jj abandon

Undo the last operation

jj undo

Sync with the Git remote

jj git fetch && jj git push

说明

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.

FAQ

What is the jj command used for?

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.

How do I run a basic jj example?

Run `jj git init --colocate` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more jj examples?

This page includes 11 examples for jj, plus related commands for nearby Linux tasks.