jj-file-track(1)
π jj-file-track β the manual, but make it make sense π
okay bestie, welcome to jj-file-track(1) from the General Commands Manual β¨ this is your girl's guide to telling jj "hey, actually track this file bestie" β let's get into it π
β¨ NAME β¨
jj-file-track β start tracking specified paths in the working copy π
πΈ SYNOPSIS πΈ
jj file track [--include-ignored] [-R|--repository]
[--ignore-working-copy] [--no-integrate-operation] [--ignore-immutable]
[--at-operation] [--debug] [--color] [--quiet] [--no-pager] [--config]
[--config-file] [-h|--help] <FILESETS>
π¦ DESCRIPTION π¦
So the whole point: you start tracking specified paths in the working copy. Periodt. π
If you pass no arguments, literally every path that is not ignored gets tracked. all of them. the whole vibe. β¨
Now here's the plot twist π«Ά by default, new files in the working copy are automatically tracked anyway, so this command has no effect β it's giving "you had one job and the job was already done." π
You can configure which paths get auto-tracked by setting snapshot.auto-track (like, say, to "none()" or "glob:**/*.rs"). And files that DON'T match that pattern? Those you can manually track with this very command, iykyk. The default pattern is all(). π
π OPTIONS π
--include-ignoredβ track paths even if they're ignored or too large. like, by defaultjj file trackwill NOT track files that are ignored by.gitignoreor that exceed the maximum file size. This flag overrides those restrictions and explicitly tracks the paths you named. she said "rules are a suggestion" πβ¨-h,--helpβ print help (see a summary with-h) π<FILESETS>β the paths to track π«Ά
π GLOBAL OPTIONS π
these ones work across the board, bestie β they're the main character energy of jj π₯
-R,--repository <REPOSITORY>β path to the repository to operate on. By default, Jujutsu searches for the closest.jj/directory in an ancestor of the current working directory. it's giving "I'll find my people, don't worry" π--ignore-working-copyβ don't snapshot the working copy, and don't update it. By default, Jujutsu snapshots the working copy at the beginning of every command, and the working copy is also updated at the end of the command if the command modified the working-copy commit (@). So if you want to avoid 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 committing the working copy. π
Also, loading the repository at a specific operation with--at-operationimplies--ignore-working-copy. no cap. β¨
--no-integrate-operationβ run the command as usual but don't integrate any operations. So the operations still get created like normal, but they do NOT get integrated into the operation log. The working copy also doesn't get updated. π«Ά
The command will print the resulting operation ID. You can pass that to, like, 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 is still pushing. π
--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. π₯
This option only affects the check. It does not affect the immutable_heads() revset or the immutable template keyword. just the check. that's it. that's the tweet. π
--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 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 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. β
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 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. she said "you can, not that you should" π
--debugβ enable debug logging π--color <WHEN>β when to colorize output. possible values:alwaysneverdebugauto
--quietβ silence non-primary command output. Like,jj file listwill still list files, but it won't tell you if the working copy was snapshotted or if descendants were rebased. Warnings and errors will still be printed tho. π--no-pagerβ disable the pager π«--config <NAME=VALUE>β additional configuration options (and yeah, it can be repeated π ). The name should be specified as TOML dotted keys. The value should be specified as a TOML expression. If a string value isn't enclosed by any TOML constructs (like array notation), the quotes can be omitted. π«Ά--config-file <PATH>β additional configuration files (also repeatable, slay β¨)
π§ quick vibe check recap πΈ
- no args = track everything not ignored
- new files are auto-tracked by default so this command is usually doing nothing
snapshot.auto-trackcontrols the auto-tracking pattern, defaultall()--include-ignored= overrides the ignore and file-size restrictions
and that's the whole page bestie, you ate it, no crumbs left π stay iconic, stay tracked π
this was jj-file-track from the General Commands Manual β the track manual page <rainbow>jj-file-track(1)</rainbow> π«Άβ¨ periodt. π
π¦ 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