-
Notifications
You must be signed in to change notification settings - Fork 0
feat: git worktree support — create, list, switch, remove #21
Copy link
Copy link
Open
Description
Summary
Add worktree picker mode (w key) to differ's TUI — list, create, switch between, and remove git worktrees without leaving the app.
Motivation
Git worktrees enable parallel branch workflows (multiple working dirs, one repo). Currently requires exiting differ, running git worktree add, cd, relaunching.
Scope
- List existing worktrees (branch + path)
- Switch to a worktree — repoint internal Repo, reload files
- Create new worktree + branch via text input
- Remove worktree with double-press confirmation
- Configurable worktree path template (
worktree_dirin config)
Keybindings
| Key | Action |
|---|---|
w |
Enter worktree picker (from file list / diff) |
j/k |
Navigate |
Enter |
Switch to selected worktree |
n |
Create new worktree+branch |
d |
Remove (double-press confirm) |
esc |
Cancel |
Technical approach
- New git methods:
ListWorktrees,AddWorktree,AddWorktreeNewBranch,RemoveWorktree - New UI mode
modeWorktreePickerfollowing branch picker pattern - Switching replaces
m.repopointer → all ops auto-target new worktree
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels