Chapter 5. Understanding branch policies

 

This chapter covers

Branch policies determine what kinds of changes can be made in a branch and who can make them. This topic is important because typically you don’t want team members to be able to make unrestricted changes in every branch. Depending on whether a particular branch contains code for development, integration, quality control, or production purposes, you’ll want to limit access to branches and only allow certain kinds of check-ins. For example, you may want to prevent direct check-ins in a quality control branch and only allow updates to that branch via merge operations from the development branch.

In this chapter, you’ll learn about access control policies and check-in policies. Access control policies determine who can access a branch and what kinds of actions they can perform. Check-in policies specify the preconditions that must be satisfied before code can be committed in a branch. Most of this chapter is devoted to check-in policies, since there’s a lot to learn about how they’re created and enforced.

In this chapter, you’ll learn about the following:

5.1. Policies and branches

5.2. Determining access control policies

5.3. Using the Custom Path policy

5.4. Creating a custom policy

5.5. Summary