jj-config-gc(1)
โจ NAME โจ
jj-config-gc โ find and optionally delete repo-level config directories whose repo path no longer exists ๐
(also hello bestie, this is one of those pages from the General Commands Manual section, so you know it's a real one ๐ซถ)
๐ SYNOPSIS ๐
jj config gc [-R|--repository] [--ignore-working-copy]
[--no-integrate-operation] [--ignore-immutable] [--at-operation]
[--debug] [--color] [--quiet] [--no-pager] [--config] [--config-file]
[-h|--help]
๐ฆ DESCRIPTION ๐ฆ
Okay so basically: this thing goes looking for repo-level config directories, yeah? And it finds the ones whose repo path no longer exists ๐ญ and then it optionally deletes them. Find and optionally delete, that's the whole vibe. Lowkey a little cleanup gremlin and honestly? iconic. โจ
๐ OPTIONS ๐
-h,--helpโ prints the help, bestie ๐ซถ (it shows you a summary if you use just-h)
๐ GLOBAL OPTIONS ๐
These ones are the shared, everywhere-options energy. Same deal for every jj command fr fr.
-R,--repository <REPOSITORY>โ the path to the repository you wanna operate on, periodt. By default, Jujutsu goes hunting for the closest.jj/directory in an ancestor of the current working directory. Like it just walks up the tree till it finds its home. ๐--ignore-working-copyโ don't snapshot the working copy, and don't update it. ๐ So by default, Jujutsu snapshots the working copy at the beginning of every command. And the working copy also gets updated at the end of the command, if the command modified the working-copy commit (@). If you'd rather avoid snapshotting the working copy and see a possibly stale working-copy commit instead, this is your flag. Super handy, like, in a command prompt, especially if you've got another process that commits the working copy. Not me juggling two processes at once ๐ Also important: 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 you give this one, the operations still get created as usual โ they just don't get integrated into the operation log. And the working copy won't be updated either. ๐ซ 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. So many doors, one key. ๐๏ธ
Heads up bestie: this does not prevent side effects outside the repo. For example, jj git push --no-integrate-operation will still perform the push. Like it still goes out into the world. ๐
--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. Note: this option only affects the check. It does not affect theimmutable_heads()revset or theimmutabletemplate keyword. Just the check, nothing else, don't get it twisted. ๐--at-operation <AT_OPERATION>โ the 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. And--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 โ no need to type the whole thing, we're not doing all that. โจ 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. (main character chaos energy tbh, do it if you want ๐ช๏ธ)--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. It's just not gonna yap at you. Warnings and errors will still be printed though โ those always get to speak. ๐ข--no-pagerโ disable the pager. No scrolling, just output right into your terminal. ๐ซ--config <NAME=VALUE>โ additional configuration options (and yes, you can repeat it, stack 'em up ๐ง). The name should be specified as TOML dotted keys. The value should be specified as a TOML expression. If the string value isn't enclosed by any TOML constructs (such as array notation), quotes can be omitted. Slay, no quotes needed. ๐--config-file <PATH>โ additional configuration files (can be repeated too, obviously ๐)
and that's the whole page, bestie!! no cap, every single flag accounted for, nothing skipped, we ate. ๐ฝ๏ธโจ
tiny cute sign-off: this page lives in the General Commands Manual under the name jj-config-gc(1), tagged gc at the bottom. mwah ๐ go clean up those dead config dirs, you absolute icon ๐
๐ฆ where this page comes from
- arch rolling: jujutsu 0.46.0-1 ยท Apache-2.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