-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
bugSomething isn't workingSomething isn't workingdocsgh-issuerelating to the gh issue commandrelating to the gh issue commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
$ gh --version
gh version 2.54.0 (2024-08-01)
https://github.com/cli/cli/releases/tag/v2.54.0I mistakenly used -b instead of -n to specify the name of the branch to create. Naturally, the branch doesn't exist, so the argument passed for -b is invalid. However, the command completes successfully, seemingly using the primary branch as the base. While my confusion was mixing up -b and -n, the deeper issue is that -b accepts branches that don't exist.
Steps to reproduce the behavior
gh issue develop -b does-not-exist-on-remote 1
Expected vs actual behavior
Instead of falling back to using the primary branch as the base for the development branch, I would expect to get an error saying something like "branch does-no-exist-on-remote does not exist on the remote".
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocsgh-issuerelating to the gh issue commandrelating to the gh issue commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic