Branch names for issues are usually typed by hand, and the link between the issue and the work only exists if someone mentions the number somewhere. gh issue develop asks GitHub to create a linked branch for the issue instead.
gh issue develop 123 --checkout
The help text describes the command as managing linked branches for an issue. With --checkout the new branch is checked out right after it is created. Some other flags from the same help page:
-n,--namesets the name of the branch to create.-b,--basenames the remote branch to create the new one from.-l,--listlists the linked branches of an issue.--branch-repocreates the branch in another repository, for example your fork.
For example, to see which branches are already linked to issue 123:
gh issue develop --list 123
And to start from a feature branch instead of the default branch:
gh issue develop 123 --base my-feature
When you use --base, the help says the new branch is configured as the base branch for pull requests created later with gh pr create.
Caveats. You need a logged-in gh, and the issue number has to come from the repository you are in, unless you add --repo owner/name. I have not run these commands against a live repository for this tip; the details come from the built-in help and the manual.
Further reading: gh issue develop manual
Going deeper: Moving on from hdtv: how to export your TV show list to Trakt.tv