jj-git-import(1)
π jj-git-import(1) β General Commands Manual π¦
okay bestie, welcome to the manual page for jj-git-import, and yes it lives in section 1 of the General Commands Manual, so you know it's a real one. let's get into it π
β¨ NAME β¨
jj-git-import β Update repo with changes made in the underlying Git repo
no cap, that's literally it. it syncs up your jj repo with whatever the Git repo underneath has been doing behind your back π
πΈ SYNOPSIS πΈ
jj git import [-R|--repository] [--ignore-working-copy]
[--no-integrate-operation] [--ignore-immutable] [--at-operation]
[--debug] [--color] [--quiet] [--no-pager] [--config] [--config-file]
[-h|--help]
she's giving effortlessly long. every single one of those flags is explained down below, so don't panic, i got you π«Ά
β DESCRIPTION β
Update repo with changes made in the underlying Git repo π« (yes, the title says it twice, that's just how manpages are, she's committed to the bit)
so here's the tea π: commits that are no longer reachable from any branch in the Git repo get considered abandoned in the Git repo, and then they get abandoned in the jj repo too, so the two stay matching. it's giving synced. if you do NOT want that, set git.abandon-unreachable-commits to false and it'll stop doing that behavior. your call, queen π
also, important: if a working-copy commit gets abandoned, it gets given a new, empty commit. and that's true in general β it's not something specific to this command. so don't come for this command specifically, okay? π
and by default, this command does literally nothing in colocated workspaces, because the import already happens automatically. the way it justβ¦ does nothing π. but if you want to force it anyway, use --ignore-working-copy to forcibly import changes. periodt.
π OPTIONS π
-h,--helpβ Print help (see a summary with '-h')
π GLOBAL OPTIONS π
these are the big-league flags that every jj command shares. iconic behavior.
-R,--repository<REPOSITORY>β Path to repository to operate on
By default, Jujutsu searches for the closest .jj/ directory in an ancestor of the current working directory. it's literally just sniffing around your folders like πβ¨
--ignore-working-copyβ Don't snapshot the working copy, and don't update it
so 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 (@). if you want to avoid snapshotting the working copy and instead see a possibly stale working-copy commit, you can use --ignore-working-copy. this may be useful e.g. in a command prompt, especially if you have another process that commits the working copy. multitasking queen π
Loading the repository at a specific operation with --at-operation implies --ignore-working-copy. it comes included, no extra charge π
--no-integrate-operationβ Run the command as usual but don't integrate any operations
when this option is given, the operations will still be created as usual but they will not be integrated to the operation log. the working copy will also not be updated. soβ¦ the operation happened, but also it didn't. the duality π¦
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 options, so much power π
note that this does not prevent side effects outside the repo. for example, jj git push --no-integrate-operation will still perform the push. she's still pushing, bestie. that part is real π
--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. so like, any commit. except the root. the root said no β
this option only affects the check. it does not affect the immutable_heads() revset or the immutable template keyword. she's only changing the one thing, no side quests π
--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. --at-op=@ is pretty much the same as the default except that divergent operations will never be merged. it's giving "how it started" vs "how it's going" π
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, she gets the vibe π₯
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. rare queen behavior, technically legal β¨
--debugβ Enable debug logging π--color<WHEN>β When to colorize output
possible values:
alwaysneverdebugauto
--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 quiet but she's still working π
warnings and errors will still be printed. those always come through, no muting π
--no-pagerβ Disable the pager--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 string value isn't enclosed by any TOML constructs (such as array notation), quotes can be omitted. toml said "i'll allow it" π
--config-file<PATH>β Additional configuration files (can be repeated)
okay that's the whole page, bestie, you're officially educated πΈπ
and as a lil sign-off: this page is sourced fromimportand lives under thejj-git-import(1)manual page. take care of her, she's doing her best π«Άβ¨
slay, go import some commits π ππ
π¦ where this page comes from
- arch rolling: jujutsu 0.46.0-1 Β· Apache-2.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