Your Code. Your Rules.

Branches

Create, delete, and set the default branch from the repository's Branches page. See Branches & Tags for the read-only listing itself, including how the ahead/behind count shown next to each branch is always measured against the current default branch.

Create a Branch

Give the new branch a name and a starting point - any existing branch, tag, or commit hash. The branch is created pointing at that ref; creating a branch never changes the default branch or any other branch.

Delete a Branch

A branch with no unmerged commits ahead of the default branch deletes with a single confirmation. A branch that does have unmerged commits ahead requires typing its exact name into a confirmation field before the deletion is accepted, since deleting it discards those commits from the branch. The default branch itself cannot be deleted - set a different default first.

Set the Default Branch

Changing the default branch updates which branch most other operations target by default - browsing the repository root, the merge form's target, and the ahead/behind comparison on this page. The branch you switch to must already exist in the repository.