-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Problem
Long branch names like feature/implement-user-authentication-with-oauth2-integration create worktree folder names that are too long. When these folder names are used as prefixes for downstream tools (e.g., MySQL database names with a 64-character identifier limit), they exceed the allowed length.
Proposed Solution
Add a --folder <name> option to git gtr new that allows specifying a custom folder name independent of the branch name.
Usage
# Create worktree with short folder name
git gtr new feature/implement-user-authentication-with-oauth2-integration --folder auth
# Reference by folder name or branch name
git gtr editor auth
git gtr go feature/implement-user-authentication-with-oauth2-integrationBehavior
--folderspecifies a complete folder name (replaces default)--folderand--nameare mutually exclusive--forceaccepts either--nameor--folder- Folder value is sanitized (slashes to hyphens)
Alternatives Considered
- Truncation with hash suffix: Rejected - deviates from core functionality
- Simple truncation: Rejected - risk of collisions
Implementation
I have a working implementation ready to submit as a PR.
Metadata
Metadata
Assignees
Labels
No labels