Linux command
jj-git-init 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Create a new colocated jj/Git repo (default)
jj git init
Create a new jj repo at a specific path
jj git init [path]
Initialize jj using an existing Git repo as the backing store
jj git init --git-repo=[path/to/git-repo]
说明
jj git init initializes a Jujutsu repository with a Git backend. By default it creates a colocated repo where both `.jj` and `.git` directories exist, allowing both jj and git commands to work on the same repo. IDE Git integration works as-is in colocated mode.
参数
- --colocate
- Create a colocated jj/Git repo. This is the default unless `git.colocate` config is set to false.
- --git-repo _path_
- Path to an existing Git repository to use as the backing store. Mutually exclusive with --colocate.
FAQ
What is the jj-git-init command used for?
jj git init initializes a Jujutsu repository with a Git backend. By default it creates a colocated repo where both `.jj` and `.git` directories exist, allowing both jj and git commands to work on the same repo. IDE Git integration works as-is in colocated mode.
How do I run a basic jj-git-init example?
Run `jj git init` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --colocate do in jj-git-init?
Create a colocated jj/Git repo. This is the default unless `git.colocate` config is set to false.