jj-arrange(1)

πŸ’… jj-arrange(1) β€” bestie edition

okay so. this is the manual page for jj-arrange, from the General Commands Manual, and honestly? she's a baddie. sit down, grab a strawberry, we're doing this together πŸ“


✨ NAME ✨

jj-arrange β€” interactively arrange the commit graph. yes, interactively. you're the main character, the graph is your canvas, and you're gonna slay it πŸŽ€


✨ SYNOPSIS ✨

jj arrange [-R|--repository] [--ignore-working-copy]
[--no-integrate-operation] [--ignore-immutable] [--at-operation]
[--debug] [--color] [--quiet] [--no-pager] [--config] [--config-file]
[-h|--help] [REVSETS]

that's a lot of brackets bestie, i know πŸ’€ but don't panic, every single one of them is explained below.


✨ DESCRIPTION ✨

interactively arrange the commit graph.

that's it. that's the whole description. lowkey iconic of them to be that brief but okay, we move πŸ’…


✨ OPTIONS ✨

  • -h, --help β€” prints the help. and listen, it specifically says "see a summary with '-h'" β€” so if you just want the lil baby summary, use -h, and if you want the full thing, use --help. yes, they're the same option, no, i don't make the rules 🫢
  • [REVSETS] β€” the revisions to arrange! πŸ¦‹ also known by the alias -r. and if you don't specify any revisions at all, it falls back to whatever you've got in the revsets.arrange setting. so like, go set that if you're tired of typing, periodt.

✨ GLOBAL OPTIONS ✨

these are the big-girl options that basically every jj command shares. buckle up, there's lore 🌸

  • -R, --repository <REPOSITORY> β€” path to the repository to operate on.

by default, Jujutsu goes hunting for the closest .jj/ directory in an ancestor of your current working directory. so like, if you're deep in some nested folder, she'll climb up the tree until she finds her home 🧚

  • --ignore-working-copy β€” don't snapshot the working copy, and don't update it.

so normally, Jujutsu snapshots your working copy at the beginning of every command like the overachiever she is. the working copy also gets updated at the end of the command, but only if the command actually modified the working-copy commit (@). if you'd rather not snapshot and you're fine looking at a possibly stale working-copy commit, this is your girl. super useful in a command prompt, especially if you've got another process out there committing the working copy. multitasking queens πŸ‘‘

ngl this has a fun side effect: loading the repo at a specific operation with --at-operation implies --ignore-working-copy. they're a package deal, iykyk.

  • --no-integrate-operation β€” run the command as usual, but don't integrate any operations.

when you pass this, the operations still get created like normal, but they don't get integrated into the operation log. the working copy also won't be updated. it's giving "i did the thing but i'm keeping it off the record" πŸ™ˆ

the command will print the resulting operation ID. you can pass that to jj --at-op to peek at the resulting repo state, or hand it to jj op restore to yeet the repo back to that state. you can also pass the ID to jj op integrate to integrate the operation (the name literally spells it out bestie).

⚠️ note that this does not prevent side effects outside the repo! for example, jj git push --no-integrate-operation will still perform the push. the push is happening fr fr. no takebacks.
  • --ignore-immutable β€” allow rewriting immutable commits 😳

by default, Jujutsu stops you from rewriting commits in the configured set of immutable commits. this option disables that check and lets you rewrite any commit β€” but not the root commit. the root stays untouchable, she's sacred πŸ’€

important: this option only affects the check. it does not affect the immutable_heads() revset or the immutable template keyword. those keep doing their own thing.

  • --at-operation <AT_OPERATION> β€” 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 when that given operation had just finished. and --at-op=@ is pretty much the same as the default, except divergent operations will never be merged. valid.

use jj op log to find the operation ID you want β€” any unambiguous prefix of the operation ID is enough. shortcuts? we love her ⭐

when you load the repo at an earlier operation, the working copy gets ignored, as if --ignore-working-copy had been specified. it's automatic, no cap.

so uh, plot twist: 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 the earlier operation. there's rarely a reason to do that, but it is possible. jj said "i'm not gonna stop you, bestie, i'm just gonna tell you what it means" πŸ”₯

  • --debug β€” enable debug logging. for when you want the tea, all of it β˜•
  • --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. she's keeping it cute and to the point ✨

warnings and errors will still be printed though β€” those never get silenced, because you need to know.

  • --no-pager β€” disable the pager. for when you want the output right there in your terminal, no scrolling drama πŸ’…
  • --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 here's the nice part: if the string value isn't enclosed by any TOML constructs (such as array notation), quotes can be omitted. chef's kiss πŸŽ€

  • --config-file <PATH> β€” additional configuration files (can be repeated). yes bestie, multiple. stack 'em πŸ¦‹

🌸 the cute lil sign-off 🌸

this gorgeous little page lives in the General Commands Manual β€” that's her home base, that's her manual name, jj-arrange(1) through and through. and the footer just says arrange next to jj-arrange(1), which, honestly? short, sweet, no notes. πŸ’–

anyway go arrange that commit graph bestie, you're gonna eat πŸ”₯πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from