jj-operation(1)

πŸ’… jj-operation β€” the operation log, but make it make sense

okay bestie, welcome to jj-operation(1) from the jj (Jujutsu) manual β€” section 1, General Commands Manual, the whole vibe. this is your group chat for everything to do with the operation log ✨


✨ NAME ✨

jj-operation β€” commands for working with the operation log 🫢


🌈 SYNOPSIS 🌈

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

πŸŽ€ DESCRIPTION πŸŽ€

commands for working with the operation log, periodt πŸ’–

if you wanna go deeper, the [operation log documentation] is literally right there:

[operation log documentation]: https://docs.jj-vcs.dev/latest/operation-log/


🌸 OPTIONS 🌸

  • -h, --help β€” print help, but the summary version because of the '-h' okay. (yes she's giving you the short version on purpose, iykyk)

πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

these ones are the main character options that work everywhere, no cap πŸ’…

  • -R, --repository <REPOSITORY> β€” path to the repository you wanna operate on πŸ—‚οΈ

by default, Jujutsu goes hunting for the closest .jj/ directory in an ancestor of wherever you're currently working. it's giving detective energy πŸ”

  • --ignore-working-copy β€” don't snapshot the working copy, and don't update it either πŸ™ˆ

by default, Jujutsu snapshots the working copy at the beginning of every command. the working copy also gets updated at the end of the command, but only if the command modified the working-copy commit (@). so if you wanna skip the snapshotting and instead peek at a possibly stale working-copy commit, --ignore-working-copy is your girl. super useful, like, in a command prompt, especially if you've got another process out there committing the working copy. multitasking queens only πŸ’–

also, loading the repository at a specific operation with --at-operation implies --ignore-working-copy. they come as a set, bestie 🫢

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

when you give this option, the operations still get created like normal, but they do not get integrated into the operation log. the working copy also won't be updated. it's giving ghosted-but-not-really πŸ‘»

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. it's a whole re-gifting economy, we love to see it 🎁

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. the push is happening, periodt. 😭
  • --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. okay rebel πŸ’…

this option only affects the check. it does not affect the immutable_heads() revset or the immutable template keyword. just the check, babe, nothing else moves. ✨

  • --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. no drama unless you ask for it 🌈

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. --at-op=@ is pretty much the same as the default except that divergent operations will never be merged. it's giving "no merging, no exceptions" 🚫

use jj op log to find the operation ID you want. any unambiguous prefix of the operation ID is enough. you don't need the whole thing, queen, a vibe is enough πŸ‘‘

when loading the repo at an earlier operation, the working copy will be ignored, as if --ignore-working-copy had been specified. lowkey implied, not even mad about it 🫢

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. we're not judging, we're just saying the power is there πŸ”₯

  • --debug β€” enable debug logging πŸ› (for when you really wanna see the receipts)
  • --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. like, the important stuff still shows up, but the side commentary is muted. main character energy only πŸ’–

warnings and errors will still be printed. can't silence the truth bestie 😭

  • --no-pager β€” disable the pager πŸš«πŸ“„ (for when you want your output to just... come out)
  • --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. if the string value isn't enclosed by any TOML constructs (such as array notation), quotes can be omitted. so forgiving, so flexible, we love her 🌸

  • --config-file <PATH> β€” additional configuration files (can be repeated) πŸ“ (yes you can stack them, go off)

πŸ¦‹ SUBCOMMANDS πŸ¦‹

the whole girl squad, one by one πŸ’œ

  • jj-operation-abandon(1) β€” abandon operation history πŸ—‘οΈ (letting it go, as one does)
  • jj-operation-diff(1) β€” compare changes to the repository between two operations πŸ” (spot the difference, bestie)
  • jj-operation-integrate(1) β€” make an operation part of the operation log πŸ«‚ (bringing her into the fold)
  • jj-operation-log(1) β€” show the operation log πŸ“œ (the receipts, the whole timeline, iconic)
  • jj-operation-restore(1) β€” create a new operation that restores the repo to an earlier state βͺ✨ (time travel but make it legal)
  • jj-operation-revert(1) β€” create a new operation that reverts an earlier operation ↩️ (undo energy, very necessary)
  • jj-operation-show(1) β€” show changes to the repository in an operation πŸ‘€ (just one operation under the spotlight)

and that's the whole page!! mwah πŸ’‹ this one lives in the General Commands Manual, source operation, filed under jj-operation(1) β€” go forth, check your op log, and stay slay πŸŽ€βœ¨πŸ’– no cap, you've got this bestie 🫢🌈

πŸ“¦ where this page comes from