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
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 --webworked successfully. As of 2.71.0, the command fails with an error:Affected version
Please run
gh versionand paste the output below.Steps to reproduce the behavior
gh pr create --webExpected vs actual behavior
I'd expect the PR to be created successfully.
Logs