git worktree: add sync command for git worktrees - #9971
Draft
calebdw wants to merge 1 commit into
Draft
Conversation
calebdw
marked this pull request as draft
August 11, 2026 18:56
calebdw
force-pushed
the
calebdw/push-lwqzmqqqoztp
branch
from
August 11, 2026 18:57
031ca0d to
9b32a5f
Compare
calebdw
force-pushed
the
calebdw/push-lwqzmqqqoztp
branch
3 times, most recently
from
August 11, 2026 20:19
6af0e6e to
bd620e9
Compare
calebdw
force-pushed
the
calebdw/push-lwqzmqqqoztp
branch
from
August 11, 2026 20:36
bd620e9 to
d96abd7
Compare
calebdw
marked this pull request as ready for review
August 11, 2026 20:37
calebdw
force-pushed
the
calebdw/push-lwqzmqqqoztp
branch
from
August 12, 2026 19:40
d96abd7 to
61b6856
Compare
calebdw
force-pushed
the
calebdw/push-lwqzmqqqoztp
branch
from
August 12, 2026 20:00
61b6856 to
1cff3c2
Compare
Contributor
|
I haven't reviewed the implementation yet, but since this isn't a backend-agnostic command, it seems better to move it under the |
calebdw
force-pushed
the
calebdw/push-lwqzmqqqoztp
branch
from
August 13, 2026 16:40
1cff3c2 to
d662974
Compare
calebdw
force-pushed
the
calebdw/push-lwqzmqqqoztp
branch
from
August 13, 2026 16:57
d662974 to
1025da4
Compare
calebdw
force-pushed
the
calebdw/push-lwqzmqqqoztp
branch
from
August 13, 2026 17:19
1025da4 to
0fd8f30
Compare
calebdw
force-pushed
the
calebdw/push-lwqzmqqqoztp
branch
from
August 13, 2026 17:25
0fd8f30 to
a02caca
Compare
calebdw
marked this pull request as draft
August 13, 2026 17:46
calebdw
force-pushed
the
calebdw/push-lwqzmqqqoztp
branch
from
August 13, 2026 17:47
a02caca to
c958c8d
Compare
Add `jj git worktree sync` command that reconciles jj workspaces with git worktrees in colocated repositories: * Adopts Git worktrees created externally (e.g. via `git worktree add`) by creating corresponding jj workspaces. * Forgets jj workspaces whose Git worktrees have been removed. * Repairs workspace paths for Git worktrees that have been moved. Add `git.auto-sync-worktrees` config (default: false) to opt into running this synchronization automatically on every jj invocation. When disabled (the default), users can run `jj git worktree sync` manually or use `jj git worktree adopt` for individual worktrees.
calebdw
force-pushed
the
calebdw/push-lwqzmqqqoztp
branch
from
August 13, 2026 18:13
c958c8d to
ee91b44
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
jj git worktree synccommand that reconciles jj workspace statewith Git worktree state in colocated repositories. It adopts
externally-created Git worktrees as jj workspaces, forgets workspaces
whose Git worktrees have been removed, and repairs paths for moved
worktrees.
Add
git.auto-sync-worktreesconfig (default:false) to opt intorunning this synchronization automatically on every jj invocation.
When disabled (the default), users can run
jj git worktree syncmanually or use
jj git worktree adoptfor individual worktrees.Checklist
If applicable:
CHANGELOG.mdREADME.md,docs/,demos/)cli/src/config-schema.json)how it works, how it's organized), including any code drafted by an LLM.
an eye towards deleting anything that is irrelevant, clarifying anything
that is confusing, and adding details that are relevant. This includes,
for example, commit descriptions, PR descriptions, and code comments.