git gtr new <branch> defaults to origin/<default-branch> and fetches origin only.
In repos where origin is a fork and upstream is the canonical remote, new worktrees start from an outdated base even when upstream/main is current.
Current behavior:
- resolves the default branch from
refs/remotes/origin/HEAD
- falls back to
origin/main or origin/master
- fetches
origin only
- creates the new branch from
origin/<default-branch>
Expected behavior:
- allow choosing the base remote explicitly
- or detect and use the canonical remote instead of hardcoding
origin
git gtr new <branch>defaults toorigin/<default-branch>and fetchesoriginonly.In repos where
originis a fork andupstreamis the canonical remote, new worktrees start from an outdated base even whenupstream/mainis current.Current behavior:
refs/remotes/origin/HEADorigin/mainororigin/masteroriginonlyorigin/<default-branch>Expected behavior:
origin