-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingcoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsgh-prrelating to the gh pr commandrelating to the gh pr commandp1Affects a large population and inhibits workAffects a large population and inhibits work
Description
Describe the bug
I have a branch created with a name of TICKET/test-name
. In github-cli versions prior to 2.71.0, gh pr create --web
worked successfully. As of 2.71.0, the command fails with an error:
➜ gh pr create --web
remote tracking branch must have format refs/remotes/<remote>/<branch> but was: refs/remotes/origin/TICKET/test-name
Affected version
Please run gh version
and paste the output below.
➜ gh version
gh version 2.71.0 (2025-04-23)
Steps to reproduce the behavior
- Create a branch with a name containing a forward slash.
- Run
gh pr create --web
- See error
Expected vs actual behavior
I'd expect the PR to be created successfully.
Logs
➜ GH_DEBUG=true gh pr create --web
[git remote -v]
[git config --get-regexp ^remote\..*\.gh-resolved$]
* Request at 2025-04-24 15:06:27.579786 +0900 JST m=+0.115545042
* Request to https://api.github.com/graphql
* Request took 749.412042ms
[git status --porcelain]
[git symbolic-ref --quiet HEAD]
[git config --get-regexp ^branch\.TICKET/test-name\.(remote|merge|pushremote|gh-merge-base)$]
[git rev-parse --symbolic-full-name TICKET/test-name@{push}]
[git config push.default]
[git config remote.pushDefault]
[git show-ref --verify -- HEAD refs/remotes/origin/TICKET/test-name]
remote tracking branch must have format refs/remotes/<remote>/<branch> but was: refs/remotes/origin/TICKET/test-name
williammartin
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsgh-prrelating to the gh pr commandrelating to the gh pr commandp1Affects a large population and inhibits workAffects a large population and inhibits work