Skip to content

gh "base repository" not worktree specific #1837

@davezarzycki

Description

@davezarzycki

gh version 1.0.0 (2020-09-16)

Setup: a "bare" git repository with multiple remotes and multiple git worktrees. For example: both https://github.com/llvm/llvm-project and https://github.com/apple/llvm-project

Problem: Unlike similar git workflows, gh asks the user to pick a "base repository" which is tied to the bare repository, not branches nor worktrees.

Workaround: create a wrapper around gh that tries to set GH_REPO as needed. In short, the script will extract the GitHub URL from git and pass it to gh: git config remote.$(git config branch.$(git branch --show-current).remote).url

Finally, and unless I missed something, the "base repository" feature seems undocumented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions