Skip to content

feat(worktree): resolve existing branches before creating new ones#6

Merged
pld merged 1 commit intopld:mainfrom
ukanga:recreate-worktree-branch-resolution
Apr 26, 2026
Merged

feat(worktree): resolve existing branches before creating new ones#6
pld merged 1 commit intopld:mainfrom
ukanga:recreate-worktree-branch-resolution

Conversation

@ukanga
Copy link
Copy Markdown
Collaborator

@ukanga ukanga commented Apr 24, 2026

Summary

  • Reuse an existing local branch when the worktree name matches it.
  • Fall back to matching remote-tracking branches, prompting when multiple remotes match.
  • Keep worktree creation behavior stable across wt new and wt session add.

Closes #5.

Verification

  • cargo fmt
  • cargo test

Copy link
Copy Markdown
Owner

@pld pld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! please resolve the conflict with the previously merged pr

@pld pld enabled auto-merge (squash) April 26, 2026 01:12
auto-merge was automatically disabled April 26, 2026 15:46

Head branch was pushed to by a user without write access

@ukanga ukanga force-pushed the recreate-worktree-branch-resolution branch from e9c9781 to 0b4c95a Compare April 26, 2026 15:46
@ukanga ukanga force-pushed the recreate-worktree-branch-resolution branch from 0b4c95a to 1690010 Compare April 26, 2026 15:51
@pld pld merged commit 47ac497 into pld:main Apr 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wt should reuse matching local branches and track matching remote branches when creating a worktree

2 participants