Skip to content

gh pr create: let specify the push remote #5717

Description

@chmouel

Describe the feature or problem you’d like to solve

when using the "gh pr create" it would be nice to be able to specify via a flag the push remote instead of always getting asked for it.

Proposed solution

add a flag for it, for example :

--push-target

Additional context

When we do a gh pr create and i have origin and "chmouel" as remote I will get asked where to push this :

image

I'd love to be able to automate this part with a flag.

Alternative

if we push before runnig gh pr create it would not ask for it, but where is the fun if we don't use gh for everything :)

Activity

  1. samcoe commented on May 30, 2022

    @samcoe
    Contributor

    @chmouel The pr create command has the --head flag which allows you specify the branch that the PR will get created from, this will bypass the push prompt. Is that the feature you are asking for?

  2. added
    more-info-neededMore info needed from user/contributor
    and removed on May 30, 2022
  3. chmouel commented on May 30, 2022

    @chmouel
    Author

    @samcoe no I am looking that the cli allow me to specify my fork remote when doing a "gh pr create"

    (i have adjusted the title and the description of the issue since it was confusing)

  4. changed the title [-]gh pr create: let specify the push branch[/-] [+]gh pr create: let specify the push remote[/+] on May 30, 2022
  5. mislav commented on Jun 21, 2022

    @mislav
    Contributor

    @chmouel Thanks for the feature request. We plan to add better choosing of push target, both as explicit flag and as the ability to set a default target. Duplicate of #1718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLImore-info-neededMore info needed from user/contributor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions