jj-git-init(1)
π NAME
jj-git-init β Create a new Git backed repo. (From the General Commands Manual, bestie β it's giving "short but iconic" π
)
β¨ SYNOPSIS
jj git init [--colocate] [-R|--repository] [--ignore-working-copy]
[--no-colocate] [--no-integrate-operation] [--object-hash] [--git-repo]
[--ignore-immutable] [--at-operation] [--debug] [--color] [--quiet]
[--no-pager] [--config] [--config-file] [-h|--help] [DESTINATION]
π¦ DESCRIPTION
Create a new Git backed repo. That's the whole main-character mission, no cap.
To use an existing Git repository as the backing store, run jj git init from that repository's root directory. This is the usual way to start using Jujutsu in an existing Git checkout. See the colocation docs: https://docs.jj-vcs.dev/latest/git-compatibility/#creating-a-repo-backed-by-an-existing-git-repo.
If the setting git.colocate has the value false, then new repositories will not be colocated. Pass --colocate to override this.
π OPTIONS
--colocateβ Colocate the workspace of the Jujutsu repo with the Git repo. Specifies that the workspace of thejjrepo should also be a validgitrepo, allowing the use of bothjjandgitcommands in the same directory. The workspace will contain a.gitdir in the top-level, so regular Git tools will be able to operate on the repo. This is the default (and this option has no effect) unless thegit.colocateconfig is set tofalse. Thegit.colocateconfig link is:https://docs.jj-vcs.dev/latest/config/#default-colocation. The--colocateoption is equivalent to--git-repo=DESTINATION. These options are mutually exclusive.--no-colocateβ Disable colocation for the workspace of the Jujutsu repo with the Git repo. Prevent Git tools that are unaware ofjjand regular Git commands from operating on the repo. The Git repository that stores most of the repo data will be hidden inside a sub-directory of the.jjdirectory. See the colocation docs for some minor advantages of non-colocated workspaces:https://docs.jj-vcs.dev/latest/git-compatibility/#colocated-jujutsugit-workspaces.--object-hash <OBJECT_HASH>β Object hash algorithm for the newly created Git repository. Corresponds togit init's--object-formatoption. If not given, thegit.object-hashconfig determines the default value. Note that the object hash cannot currently be changed for an existing repo, and not all code forges support SHA-256 repositories yet. See also Git'shash-function-transitiondocument for an in-depth explanation of the migration towards stronger hash functions:https://git-scm.com/docs/hash-function-transition. Thegit.object-hashconfig link is:https://docs.jj-vcs.dev/latest/config/#default-object-hash-format. Possible values:sha1sha256
--git-repo <GIT_REPO>β Specifies a path to an existing git repository to be used as the backing git repo for the newly createdjjrepo. If the specified--git-repopath is the same asDESTINATION, then a colocated workspace will be created, and bothjjandgitcommands will work on the repo. Thegit.colocatesetting is ignored in this case. If the specified--git-repopath is outside of the givenDESTINATION, then the Jujutsa workspace will store a reference to the external Git repository (not a colocated workspace). This option is mutually exclusive with--collate. The colocated workspace link is:https://docs.jj-vcs.dev/latest/git-compatibility/#colocated-jujutsugit-workspaces.-h,--helpβ Print help (see a summary with '-h').[DESTINATION] [default: .]β The destination directory where thejjrepo will be created. If the directory does not exist, it will be created. If no directory is given, the current directory is used.
π GLOBAL OPTIONS
-R,--repository <REPOSITORY>β Path to repository to operate on. By default, Jujutsu searches for the closest.jj/directory in an ancestor of the current working directory.--ignore-working-copyβ Don't snapshot the working copy, and don't update it. By default, Jujutsu snapshots the working copy at the beginning of every command. The working copy is also updated at the end of the command, if the command modified the working-copy commit (@). If you want to avoid snapshotting the working copy and instead see a possibly stale working-copy commit, you can use--ignore-working-copy. This may be useful e.g. in a command prompt, especially if you have another process that commits the working copy. Loading the repository at a specific operation with--at-operationimplies--ignore-working-copy.--no-integrate-operationβ Run the command as usual but don't integrate any operations. When this option is given, the operations will still be created as usual but they will not be integrated to the operation log. The working copy will also not be updated. The command will print the resulting operation ID. You can pass that to e.g.jj --at-opto inspect the resulting repo state, or you can pass it tojj op restoreto restore the repo to that state. You can also pass the ID tojj op integrateto integrate the operation. Note that this does not prevent side effects outside the repo. For example,jj git push --no-integrate-operationwill still perform the push.--ignore-immutableβ Allow rewriting immutable commits. By default, Jujutsu prevents rewriting commits in the configured set of immutable commits. This option disables that check and lets you rewrite any commit but the root commit. This option only affects the check. It does not affect theimmutable_heads()revset or theimmutabletemplate keyword.--at-operation <AT_OPERATION>β Operation to load the repo at. Operation to load the repo at. By default, Jujutsu loads the repo at the most recent operation, or at the merge of the divergent operations if any. You can use--at-op=<operation ID>to see what the repo looked like at an earlier operation. For examplejj --at-op=<operation ID> stwill show you whatjj stwould have shown you when the given operation had just finished.--at-op=@is pretty much the same as the default except that divergent operations will never be merged. Usejj op logto find the operation ID you want. Any unambiguous prefix of the operation ID is enough. When loading the repo at an earlier operation, the working copy will be ignored, as if--ignore-working-copyhad been specified. It is possible to run mutating commands when loading the repo at an earlier operation. Doing that is equivalent to having run concurrent commands starting at the earlier operation. There's rarely a reason to do that, but it is possible.--debugβ Enable debug logging.--color <WHEN>β When to colorize output. Possible values:alwaysneverdebugauto
--quietβ Silence non-primary command output. For example,jj file listwill still list files, but it won't tell you if the working copy was snapshotted or if descendants were rebased. Warnings and errors will still be printed.--no-pagerβ Disable the pager.--config <NAME=VALUE>β Additional configuration options (can be repeated). The name should be specified as TOML dotted keys. The value should be specified as a TOML expression. If string value isn't enclosed by any TOML constructs (such as array notation), quotes can be omitted.--config-file <PATH>β Additional configuration files (can be repeated).
That's the whole page, bestie π«Ά β footer source/version flex: init and jj-git-init(1), with the date slot doing its little cameo. π
β¨
π¦ where this page comes from
- arch rolling: jujutsu 0.46.0-1 Β· Apache-2.0
- nixpkgs unstable: jujutsu 0.46.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms