Create a Production Branch
Follow your organization's guidelines to create a branch and protect it from unverified changes. To protect the branch, you can set merge restrictions, make the branch private, and restrict who can push commits to it, or freeze it.
- In the left navigator, click Git .
- Click the Refs view and then click Branches .
- From the Repositories drop-down list, select the repository.
- Click + Create Branch.
- In the New Branch dialog box, in Name, enter the branch name. From the Base drop-down list, select the
main
branch as the base branch. - Click Create.
After creating the production branch, any changes pushed to the main
branch aren't automatically available in the production branch. You must create a merge request or manually push the changes to the production branch.
If you want to set merge restrictions on the production branch, see Set Review and Merge Restrictions on a Repository Branch. To freeze the branch or make it private, or set other restrictions, see Protect a Branch.