gh issue develop
Create a branch to work on an issue
What it does
gh issue develop creates a branch on GitHub linked to the issue: it shows up under Development, and a PR from it is tied to the task. By default the branch name is built from the issue's number and title.
--checkout fetches the branch and switches to it right away, --name sets your own name, and --base the branch to start from.
Syntax
gh issue develop <number> --checkout
gh issue develop <number> --name <branch> --base <branch>Examples
Create a branch to work on issue 12 and switch to it right away
gh issue develop 12 --checkoutsame as:
gh issue develop 12 -cissue develop 12— a branch linked to the issue on GitHub--checkout— and switch to it
Related commands
- gh issue create — Open a new issue
- gh pr create — Open a pull request from the current branch
- git switch — Switch to another branch, or create a new one and switch to it