jj-git-root(1)
π jj-git-root β the manual page, but make it cute π
okay so bestie, you're reading the man page for jj-git-root from the General Commands Manual (yeah, the manual name is jj-git-root, section 1, that's her official government name β¨). She's a little command with one very specific job and honestly? she eats every time. let's get into it.
β¨ NAME β¨
jj-git-root β show the underlying Git directory of a repository using the Git backend
πΈ SYNOPSIS πΈ
jj git root [-R|--repository] [--ignore-working-copy]
[--no-integrate-operation] [--ignore-immutable] [--at-operation]
[--debug] [--color] [--quiet] [--no-pager] [--config] [--config-file]
[-h|--help]
π¦ DESCRIPTION π¦
Show the underlying Git directory of a repository using the Git backend π
like. that's it. that's the whole thing. she shows you the Git directory underneath, using the Git backend. no cap.
π OPTIONS π
-h,--helpβ print help. and btw if you pass just-h(the short one) you get a summary version. iykyk π
π GLOBAL OPTIONS π
these are the big-girl options that work across the whole family, so pay attention bestie π«Ά
-R,--repository <REPOSITORY>β path to the repository you wanna operate on ποΈ
default behavior is that Jujutsu goes looking for the closest .jj/ directory in an ancestor of the current working directory. so she's sniffing up the tree like a little bloodhound. adorable. efficient.
--ignore-working-copyβ don't snapshot the working copy, and don't update it π
so here's the deal: by default, Jujutsu snapshots the working copy at the beginning of every single command. and then the working copy also gets updated at the end of the command, but only if the command modified the working-copy commit (@). if you wanna avoid snapshotting entirely and just vibe with a possibly stale working-copy commit, use --ignore-working-copy. this is lowkey useful in stuff like a command prompt, especially if you've got another process out there committing the working copy for you.
also important: loading the repository at a specific operation with --at-operation implies --ignore-working-copy. so don't be surprised when that happens, it's on purpose π
--no-integrate-operationβ run the command like normal but don't integrate any operations β¨
when you give this option, the operations still get created like they always do, they just won't be integrated into the operation log. and the working copy also won't be updated.
the command will print the resulting operation ID for you π you can hand that ID to e.g. jj --at-op to inspect the resulting repo state, or pass it to jj op restore to restore the repo back to that state. you can also pass the ID to jj op integrate to integrate the operation.
β οΈ but listen β this does not prevent side effects outside the repo. for example, jj git push --no-integrate-operation will still perform the push. she said what she said. π«
--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 β except the root commit, bestie, she's forever.
this option only affects the check. it does not affect the immutable_heads() revset or the immutable template keyword. so don't get it twisted π
--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 there are any.
you can use --at-op=<operation ID> to see what the repo looked like at an earlier operation. for example jj --at-op=<operation ID> st will show you what jj st would have shown you back when the given operation had just finished. and --at-op=@ is pretty much the same as the default, except divergent operations will never be merged.
use jj op log to find the operation ID you want π any unambiguous prefix of the operation ID is enough.
when you load the repo at an earlier operation, the working copy gets ignored β as if --ignore-working-copy had been specified.
and yes, it is possible to run mutating commands while loading the repo at an earlier operation. doing that is equivalent to having run concurrent commands starting at that earlier operation. there's rarely a reason to do that, but it is possible. main character chaos energy, honestly π
--debugβ enable debug logging π--color <WHEN>β when to colorize output π
possible values:
alwaysneverdebugauto
--quietβ silence non-primary command output π€«
for example, jj file list will still list files, but it won't tell you whether the working copy was snapshotted or if descendants were rebased.
warnings and errors will still be printed though. she's quiet, not gone. β¨
--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. and if the string value isn't enclosed by any TOML constructs (such as array notation), quotes can be omitted. slay.
--config-file <PATH>β additional configuration files (can be repeated) π
and that's the whole page, bestie!! no crumbs left, every flag accounted for, nothing skipped π
this gorgeous little doc came to you from source root, filed under manual jj-git-root(1). stay iconic, keep your working copy clean, and remember: she's just showing you the Git directory. periodt. π
ππ¦
π¦ where this page comes from
- alpine 3.24: jujutsu-doc 0.42.0-r0 Β· Apache-2.0
- arch rolling: jujutsu 0.46.0-1 Β· Apache-2.0
- nixos 26.05: jujutsu 0.41.0
- nixpkgs unstable: jujutsu 0.46.0
- ubuntu stonking: jujutsu 0.44.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms