Creates a new git worktree for a feature branch and opens it in a new terminal tab.
-
Set up worktrees directory
- Default location is
../worktrees
relative to project root - Can be customized by setting
WORKTREES_DIR
environment variable
- Default location is
-
Create worktree with feature description
- Pass a descriptive name for the feature branch
- Branch name will be formatted as:
YY-MM-feature-description
- Example:
worktree "add auth feature" "Build authentication system"
-
New terminal tab opens
- Opens worktree directory in new terminal tab
- Any provided prompt text is displayed in the new tab
- Use exactly osascript -e 'tell application "System Events" to keystroke "t" using command down'
-
Uses standard terminal commands to open new tabs
-
Maintains consistent branch naming convention
-
Keeps worktrees organized in dedicated directory
-
Do not mention the terminal app name in any osascript.
-
If not feature name is supplied, ask for a feature name first.
-
Choose descriptive feature names
-
Keep branch names consistent
-
Organize worktrees logically
-
Clean up old worktrees when no longer needed