Issues and pull requests / Issues
Start a branch from an issue
You pick up an issue, and you want a branch for the work. Make the branch from the issue, and the issue lists it under Development.
2 min read
You need write access to the repository: the write, maintain or admin role.
1. Make the branch
- Open the issue.
- In the sidebar, next to Development, click Create.
- If you want a name of your own, type it in Branch name (optional). Without a name, the forge names the branch from the issue number and title.
- If the branch must start from a branch other than the default branch, type that branch in Start from (optional).
- Click Create branch.
The sidebar then shows the commands that check out the branch.
In a terminal, in your clone, run:
src issue develop 12 --checkout
--checkoutfetches the new branch and checks it out.--name fix-loginsets the name of the branch.--base releasesets the branch to start from.src issue develop 12 --listlists the branches of the issue.
2. Check out the branch
If you made the branch on the web, copy the commands from the sidebar, and run them in your clone. With --checkout, src already did this step.
Done
- The sidebar of the issue lists its branches under Development.
- Your clone is on the new branch, ready for the work.
Later: REST and MCP
An agent or a script makes a branch with the same rules. The REST path is under /api/v1/repos/{owner}/{repo}.
| You want to | REST | MCP tool |
|---|---|---|
| List or make branches | GET or POST /issues/{n}/branches, with { "name", "base" } | list_issue_branches, create_issue_branch |
Use the REST API has the other routes.