jj-config-gc(1)

๐Ÿ“ฆ version 0.46.0, in arch rolling, nixpkgs unstable, ubuntu stonking

โœจ 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-operation implies --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-op to inspect the resulting repo state, or you can pass it to jj op restore to restore the repo to that state. You can also pass the ID to jj op integrate to 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 the immutable_heads() revset or the immutable template 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 example jj --at-op=<operation ID> st will show you what jj st would 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. ๐Ÿ”ฎ Use jj op log to 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-copy had 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:
    • 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 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