Skip to content

gh pr create fails in v2.64.0 if the current branch doesn't have the upstream configured #10188

@cmbrose

Description

@cmbrose

Describe the bug

There appears to be a regression in v2.64.0 where gh pr create will now fail to create the PR unless the upstream is available via git config (basically requiring the -u option of git push). The error is aborted: you must first push the current branch to a remote, or use the --head flag from here.

Note I've already started a PR to fix this here: #10177

Internal tracking issue: https://github.com/github/cli/issues/730

Steps to reproduce the behavior

  1. git checkout -B my-branch
  2. Make some edit and git commit it
  3. git push origin my-branch
  4. gh pr create ...

Expected vs actual behavior

Up to and including v2.63.2 these commands succeed. In v2.64.0 it will fail with the above error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-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