← 返回命令列表

Linux command

jj-git 命令

文本

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

常用示例

Clone a Git repository

jj git clone [url]

Initialize jj in an existing Git repository (colocated)

jj git init --colocate

Fetch from all remotes

jj git fetch

Push current branch to remote

jj git push

Import Git refs into jj

jj git import

Export jj refs to Git

jj git export

Add a Git remote

jj git remote add [name] [url]

说明

jj git provides Git interoperability for Jujutsu (jj), a modern version control system. It enables cloning, fetching, pushing, and managing remotes on Git servers. Jujutsu uses Git as its storage backend, so all explicit Git interop commands live under the git subcommand. The init --colocate option allows using jj alongside an existing .git directory, keeping both in sync.

参数

clone _URL_ _DESTINATION_
Clone a Git repository and create a jj repo.
init _DESTINATION_
Create a new Git-backed jj repository.
fetch
Fetch from Git remotes.
push
Push to a Git remote.
import
Import Git refs (branches, tags) into jj's internal state.
export
Export jj refs to Git refs.
remote _subcommand_
Manage Git remotes (add, remove, list, rename).
--remote _NAME_
Specify remote name.
--branch _BRANCH_
Specify branch (for push/fetch).
--help
Display help information.

FAQ

What is the jj-git command used for?

jj git provides Git interoperability for Jujutsu (jj), a modern version control system. It enables cloning, fetching, pushing, and managing remotes on Git servers. Jujutsu uses Git as its storage backend, so all explicit Git interop commands live under the git subcommand. The init --colocate option allows using jj alongside an existing .git directory, keeping both in sync.

How do I run a basic jj-git example?

Run `jj git clone [url]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does clone _URL_ _DESTINATION_ do in jj-git?

Clone a Git repository and create a jj repo.