-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The way I use git is to stay in "detached HEAD," except when working on my own feature branches. For example, I don't keep a local master branch, and instead just refer to origin/master as necessary.
This breaks gh:
➜ gh --version
gh version DEV
https://github.com/cli/cli/releases/latest
➜ gh pr status
could not query for pull request for current branch: could not determine current branch: git: not on any branch
I built the tool via go install github.com/cli/cli/cmd/gh on the current latest commit (28f91cb).
Expected vs actual behavior
See above console output for actual behavior. What I expect is something like the following:
➜ gh pr status
Relevant pull requests in <REPO>
Current branch
could not query for pull request for current branch: could not determine current branch: git: not on any branch
Created by you
...
Requesting a code review from you
...
Note that the error about not being on a branch is only relevant for the "current branch" section, so the gh tool should still output the other sections.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working