From the course: Designing and Implementing Source Control using GitHub and Azure DevOps
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Setting up branch security
From the course: Designing and Implementing Source Control using GitHub and Azure DevOps
Setting up branch security
- [Narrator] As you know, the main branch is usually the default in a Git repository, and it's where the most important and stable code is stored. That's why it's crucial to protect it from accidental or malicious changes. If a team member or malicious actor pushes a bad commit to the main branch, it can cause a lot of headaches and downtime. That is why protecting the main branch from accidental or malicious changes is important. So how do we protect our main branch in Azure DevOps? Fortunately, it's quite easy to do so. First, you need to go to your project, and under the Repos section, select Branches. From there, you can select the main branch and select the Branch policies option. This will bring up the Branch Policies settings. In the Branch Policies settings, you can enforce certain rules that will prevent people from making changes to the main branch without the necessary checks. For example, you can require…