Sprint branch management allows you to view, protect, archive, and modify sprint branches within your project.Accessing Sprint Branch Management#
Option 1: Click Manage Sprint Branches in the sprint branch switch next to APIsOption 2: Navigate to Settings → Manage Sprint BranchesOn the management page, you can:View a complete list of sprint branches
Perform various operations on branches
On the Manage Sprint Branches page, each branch row shows an ID tag next to the branch name. Click the ID tag to copy the branch ID.You may need the branch ID when using APIs, automation, integrations, or generated CLI commands that require a branch context.
Protecting Branches#
Currently, only the main branch can be set as protected.
When you hover over a branch, you'll see available actions. To enable protection:1.
Click the Edit icon at the end of the main branch row.
2.
In the Edit Sprint Branch window, turn the Protected option on.
3.
Select Branch Admins that should have administrative access on that branch.
When a branch is protected, direct modifications are not allowed. Changes must be made through a Merge Request (MR) from another branch and the branch admin can approve or reject MRs.You can optionally turn on the options for branch admins to be able to edit resources directly in the branch. This option lets branch administrators to directly modify protected branches without submitting a merge request.
Archiving and Restoring Sprint Branches#
Archiving Branches#
Archiving indicates that a sprint branch's development lifecycle is complete and it will no longer be used for business purposes. Archived branches are collapsed in the management page by default. Archived branches no longer appear in the sprint branch switch.To archive a branch: Click the Archive icon next to the relevant branch.Restoring Branches#
If you need to query content from a previously archived sprint branch: Click on the Restore icon next to the archived branch.Once a branch is restored, it becomes a normal branch again that you can switch to and continue working on.Modifying Sprint Branches#
Renaming Branches#
You can click on the Edit icon to open the sprint branch editing window and rename a sprint branch.Deleting Branches#
To delete a sprint branch, you first need to archive it following the archiving process discussed above. After a branch is archived, you can click on the Delete icon next to the Restore icon to permanently delete the branch.Deleting a branch removes all its content permanently and cannot be undone. We recommend using Archive instead of Delete in most circumstances.