You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
improve gh repo set-default to work with remote names #9149
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.
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
Reacted by topherbuckley, Hari Sekhon, Andrew Kaster and Ricardo Fernández Serrata
I could have sworn I'd seen this somewhere before but alas I cannot find it. I agree that this is a reasonable enhancement and something I would be happy to accept a PR for. Thanks for taking the time to write it up!
Activity
williammartin commentedon May 31, 2024
I could have sworn I'd seen this somewhere before but alas I cannot find it. I agree that this is a reasonable enhancement and something I would be happy to accept a PR for. Thanks for taking the time to write it up!
babakks commentedon Jan 14, 2026
This is now added to
gh, and it'll be available with the next release (i.e.v2.84.0).ck4865028-pixel commentedon Jan 21, 2026
ck4865028-pixel commentedon Jan 21, 2026
ck4865028-pixel commentedon Jan 21, 2026
ck4865028-pixel commentedon Jan 21, 2026