jj-sparse-set(1)
π jj-sparse-set β it's giving "only show me what I asked for" π
okay bestie, gather round, because we're talking about jj-sparse-set(1), aka the manual page for updating the patterns that are present in the working copy. yes, that's the whole glow-up: you tell your working copy which bits you actually want to see, and it stops dragging the rest of the repo into your face. iconic behaviour tbh. π¦
β¨ SYNOPSIS β¨
jj sparse set [--add] [-R|--repository] [--ignore-working-copy]
[--remove] [--clear] [--no-integrate-operation] [--ignore-immutable]
[--at-operation] [--debug] [--color] [--quiet] [--no-pager] [--config]
[--config-file] [-h|--help]
πΈ DESCRIPTION πΈ
Update the patterns that are present in the working copy. that's it, that's the mission. π
like, say all you need in life is README.md and the lib/ directory (main character minimalism, we love to see it). then you go:
jj sparse set --clear --add README.md --add lib
and boom, that's your working copy. and then the day comes when lib is no longer serving you? totally valid. jj sparse set --remove lib and it's gone from your working copy. no drama, no cap. β¨
π OPTIONS π
--add<ADD> β the patterns you want to add to the working copy. gotta have 'em, adding 'em. π--remove<REMOVE> β the patterns you want removed from the working copy. bye bestie, it's not you it's the sparse checkout. π«Ά--clearβ include no files in the working copy. yes, zero. empty. a blank canvas, a fresh face. combine it with--addso you're not just staring into the void. π³οΈ-h,--helpβ prints the help. ngl the short version with-his a summary, so if you want the whole thing, don't use the shorthand. π
π GLOBAL OPTIONS π
-R,--repository<REPOSITORY> β path to the repository you want to operate on. by default, Jujutsu goes looking for the closest.jj/directory in an ancestor of the current working directory. it's very "I'll find you" of it. π--ignore-working-copyβ don't snapshot the working copy, and don't update it.
so normally Jujutsu snapshots the working copy at the beginning of every command. and the working copy also gets updated at the end of the command, but only if the command modified the working-copy commit (@). if you'd rather skip the snapshotting and instead see a possibly stale working-copy commit, use --ignore-working-copy. this is lowkey useful in like a command prompt, especially if you've got another process out here committing the working copy for you.
also, heads up: loading the repository at a specific operation with --at-operation implies --ignore-working-copy. so that's just included, free of charge. π
--no-integrate-operationβ run the command as usual but don't integrate any operations.
when you give this option, the operations will still be created as usual, but they will not be integrated into the operation log. the working copy also won't be updated. π
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.
β οΈ 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 does not care about your operation log feelings. π
--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. root commit stays untouchable, periodt. π
this option only affects the check. it does not affect the immutable_heads() revset or the immutable template keyword. don't get it twisted. β¨
--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.
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. no merging. none. π
use jj op log to find the operation ID you want. any unambiguous prefix of the operation ID is enough.
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. so like, you can, but should you? π€
--debugβ enable debug logging. for when you want the tea. π--color<WHEN> β when to colorize output.
possible values:
alwaysneverdebugauto
aesthetic choice, honestly. π
--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 keeping it cute and concise. π€«
warnings and errors will still be printed, though. those always make it through. π
--no-pagerβ disable the pager. raw output, no scrolling, direct to your eyeballs. π--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. fyi for when you're being fancy with it. π
--config-file<PATH> β additional configuration files (can be repeated). again: repeatable. stack 'em. π§
π¦ SEE ALSO π¦
ngl bestie, there's no SEE ALSO section in this one β this page is a standalone queen. π
π mwah, that's the whole page. now go forth and only look at the files you actually asked for.
this gem of a manpage is from the set source, filed under jj-sparse-set(1) β that's the footer energy, and it says jj-sparse-set(1) one more time for the people in the back. stay sparsely checked out and heavily hydrated, bestie. π«Άβ¨π
π¦ where this page comes from
- alpine 3.24: jujutsu-doc 0.42.0-r0 Β· Apache-2.0
- arch rolling: jujutsu 0.46.0-1 Β· Apache-2.0
- nixos 26.05: jujutsu 0.41.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