Skip to content

git gtr new hardcodes origin for default base ref #170

Description

@scarf005

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions