Skip to content

Auto-name worktrees after branch names #38

@pyxelr

Description

@pyxelr

Feature description | 功能描述

Description

When creating a new worktree using the extension (using Git Worktree Manager pane > Add Worktree button), it suggests a generic folder name like worktree1 and then asks to pick up the branch name. This results in the VS Code window title showing worktree1 instead of something more meaningful like a branch name.

Image

Desired Behavior

The worktree folder should automatically be named after the selected branch name, so the VS Code window title displays something like repository - branch-name or just branch-name instead of worktree1.

Suggested Implementation

  • When prompting for a new worktree, either:
    • Pre-populate the folder name field with the branch name after the user selects/enters a branch
    • Add a setting to use a naming template (e.g., {branchName}, {repoName}-{branchName})
    • Add a checkbox option "Use branch name as folder name" (default: checked)

How would you use this feature? | 你希望如何使用此功能?

No response

Alternative solutions | 替代方案

Currently, users must manually replace the suggested "worktree1" with their desired folder name (typically the branch name).

Alternative option is to use CMD+SHIFT+P > Git: Create Worktree... option.

Additional context | 其他信息

No response

Would you like to work on this issue? | 你是否愿意参与此功能的开发?

None

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions