jj-sparse-reset(1)

πŸ’… jj-sparse-reset β€” the manual, but make it make sense

hey bestie, welcome to jj-sparse-reset(1) from the General Commands Manual πŸŽ€ this is a page about resetting your sparse patterns so literally every file in the working copy is included again. tiny command, big glow-up energy. let's get into it ✨


🌸 SYNOPSIS 🌸

jj sparse reset [-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 here's the whole entire plot: it resets the patterns to include all files in the working copy. that's it. that's the vibe. everything comes back, no files left behind, periodt πŸ’–


✨ OPTIONS ✨

  • -h, --help β€” print help (and if you want the short-and-snappy summary instead, use -h) πŸ™ˆ

πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

πŸ’œ repository stuff

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

by default, Jujutsu goes hunting for the closest .jj/ directory in an ancestor of your current working directory. like it's looking up your family tree for the repo πŸ’€

🌈 working-copy stuff

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

so normally, by default, Jujutsu snapshots the working copy at the beginning of every single command. and the working copy also gets updated at the end of the command, that is β€” if the command modified the working-copy commit (@). if you'd rather skip the snapshotting and instead peek at a possibly stale working-copy commit, --ignore-working-copy is your girl. this is lowkey useful e.g. in a command prompt, especially if you've got another process out there committing the working copy. multitasking queen ✨

heads up: loading the repository at a specific operation with --at-operation implies --ignore-working-copy. it's automatic, no cap.

  • --no-integrate-operation β€” run the command like normal but don't integrate any operations πŸŒ€

when you pass this, the operations still get created as usual, but they will not be integrated to the operation log. the working copy also won't be updated. it's giving "the work happened, the paperwork did not" 😭

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 opened, we love options πŸ’…

note that this does not prevent side effects outside the repo. for example, jj git push --no-integrate-operation will still perform the push. so like… the push is pushing, bestie. it's pushing πŸ”₯

🧚 immutable commits

  • --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. (the root commit said "not today" and honestly, respect.)

this option only affects the check. it does not affect the immutable_heads() revset or the immutable template keyword. so don't be out here thinking it rewrites the rules of the universe, it just skips one little bouncer πŸŽ€

⭐ time travel (operation loading)

  • --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 any exist.

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. icon behaviour tbh 🌸

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 monsters.

when loading the repo at an earlier operation, the working copy will be ignored, as if --ignore-working-copy had been specified. told you it was automatic.

and yes β€” 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. chaotic, but possible πŸ’€

πŸ”§ debugging & output

  • --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 giving minimalism.

warnings and errors will still be printed though. those never get quiet, unfortunately 😭

  • --no-pager β€” disable the pager πŸ“„

πŸ’– config stuff

  • --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. iykyk ✨

  • --config-file <PATH> β€” additional configuration files (can be repeated) πŸ“

🫢 one last thing

that's the whole page, bestie! you ate. this was jj-sparse-reset from section 1 of the General Commands Manual, footer tagged reset / jj-sparse-reset(1) β€” so like, the source is the jj manual itself and the version tag is just jj-sparse-reset(1) with reset hanging out on the left. slay, go reset those patterns, and remember: all files, all included, main character energy only πŸ‘‘πŸ’…

πŸ“¦ where this page comes from