Worktree
Add Worktree
Create named worktrees with new branches.
gmc wt add creates one or more sibling worktrees.
Usage
gmc wt add feature-login
gmc wt add feat-a feat-b feat-cBase branch
gmc wt add hotfix-bug123 -b releaseSync first
gmc wt add feature-login --syncPR shortcut
gmc wt add --pr 1065JSON output
gmc wt add feat-a feat-b -o jsonPrints a JSON array on stdout with one result per name: name, path,
branch, base (omitted when an existing branch is checked out), created,
error, and warnings. Progress and hook output go to stderr. If any name
fails, the command exits non-zero, the array still lists every name, and
worktrees already created are kept. With --pr, the array has one item named
pr/<number> whose base is <remote>/pull/<number>/head.
Notes
Use clear names. The worktree name normally becomes the branch name.