Skip to content

Consistent aliases: gh co and gh pr co #11597

Closed

Description

@koppor

Describe the feature or problem you’d like to solve

In the default setting one needs to omit pr, which is confusing (because it is not consistent why one needs to write checkout in one place and co in another place although both terms have the same effect)

$ gh pr co 13280
unknown command "co" for "gh pr"
$ gh co 13280
remote: Enumerating objects: 178, done.

Proposed solution

gh pr co 13280

working

This fullfils IMHO conformity with user expectations.

Additional context

This is a follow-up of #1303

Activity

  1. github-actions commented on Aug 27, 2025

    @github-actions
    Contributor

    Thank you for your issue! We have categorized it as a feature request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.

    Unless you see the help wanted Contributions welcome label, we are not currently looking for external contributions for this feature.

    If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.

  2. babakks commented on Aug 27, 2025

    @babakks
    Member

    Hi @koppor, And thanks for the issue! 🙏

    Since the gh co is already a default alias (and is the only one), I don't see any harm in having pr co.

    Warning

    A bit unrelated, but users should beware of using gh co as explained in #4789 (comment), mostly because it's not a really hard-coded alias and it can get deleted or reassigned by the user.

    WDYT, @BagToad?

  3. changed the title [-]Consisnt aliases: `gh co` and `gh pr co`[/-] [+]Consistent aliases: `gh co` and `gh pr co`[/+] on Aug 27, 2025
  4. BagToad commented on Sep 2, 2025

    @BagToad
    Member

    Hi @koppor, And thanks for the issue! 🙏

    Since the gh co is already a default alias (and is the only one), I don't see any harm in having pr co.

    Warning

    A bit unrelated, but users should beware of using gh co as explained in #4789 (comment), mostly because it's not a really hard-coded alias and it can get deleted or reassigned by the user.

    WDYT, @BagToad?

    @babakks I think I'd prefer we add a real Cobra alias to the pr checkout subcommand so gh pr co is natively supported instead of it being a default gh alias.

    It would be scoped to the pr command set, so there's no risk of collision with extensions and whatnot. I don't think it makes sense to make it a default gh alias over a real Cobra alias, personally.

  5. babakks commented on Sep 24, 2025

    @babakks
    Member

    @BagToad Oh, yes, Definitely.

  6. linked a pull request that will close this issueAdd alias `co` for `pr checkout` #11804on Sep 24, 2025
  7. self-assigned this
    on Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementa request to improve CLIgh-prrelating to the gh pr command

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions