Skip to content
Source
Sign inSign up

Start a branch

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

  1. Open the issue.
  2. In the sidebar, next to Development, click Create.
  3. 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.
  4. If the branch must start from a branch other than the default branch, type that branch in Start from (optional).
  5. 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
  • --checkout fetches the new branch and checks it out.
  • --name fix-login sets the name of the branch. --base release sets the branch to start from.
  • src issue develop 12 --list lists 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 toRESTMCP tool
List or make branchesGET or POST /issues/{n}/branches, with { "name", "base" }list_issue_branches, create_issue_branch

Use the REST API has the other routes.