You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(worktree): ✨ Fix branch tracking and support remote branch checkout (#157)
* feat(worktree): ✨ support checking out remote branches with upstream tracking
Add the ability to create a worktree from a remote branch by automatically creating a local tracking branch. Previously, users could only select local branches in the worktree dialog, limiting the ability to work on un-checked-out remote branches.
Key changes include:
- Expose a `trackUpstream` field in the worktree creation input model to control whether the new branch tracks the base ref as its upstream; defaults to `false` for feature branches
- Respect `trackUpstream` in the backend worktree add command by passing `--no-track` when the flag is `false`
- In the UI dialog, compute remote branches that have no local counterpart and display them in a dedicated section labeled "remote" alongside local branches
- When a remote branch is selected, construct a create-branch input with `trackUpstream: true` so the local branch automatically tracks the remote ref, enabling `git pull` to work out of the box
This allows developers to spin up a worktree from any remote branch (e.g., a PR branch) without needing to manually create a local branch beforehand.
* test(worktree): ✅ add track_upstream parameter to test fixtures
0 commit comments