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:

  • always
  • never
  • debug
  • auto
  • --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