-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Labels
enhancementa request to improve CLIa request to improve CLIgh-reporelating to the gh repo commandrelating to the gh repo commandhelp wantedContributions welcomeContributions welcome
Description
when using multiple repos (forks) you often need to change the default remote.
this can be accomplished with gh repo set-default [HOST/]OWNER/REPO (or via an interactive UI) however sometimes you just want to type (but type less).
I would suggest an improvement where in addition to allowing [HOST/]OWNER/REPO the command would also take a remote name from which it can (if needed) extract the needed info.
e.g.
given
❯ git remote -v
jtnord https://github.com/jtnord/some-repo-name.git (fetch)
jtnord https://github.com/jtnord/some-repo-name.git (push)
octocat https://github.com/octocat/some-other-repo-name.git (fetch)
octocat https://github.com/octocat/some-other-repo-name.git (push)
origin https://github.com/myorg/some-repo-name.git (fetch)
origin https://github.com/myorg/some-repo-name.git (push)
instead of gh repo set-default myorg/some-repo-name I should be able to use gh repo set-default origin
likewise instead of gh repo set-default octocat/some-other-repo-name I should be able to use gh repo set-default octocat
topherbuckley, HariSekhon and ADKaster
Metadata
Metadata
Assignees
Labels
enhancementa request to improve CLIa request to improve CLIgh-reporelating to the gh repo commandrelating to the gh repo commandhelp wantedContributions welcomeContributions welcome