Isolating your code with branches

When developing an application, we often need to modify part of the code without wanting to impact the existing stable code of the application. For this, we will use a feature that exists in all VCSes that allows us to create and manage branches. The mechanics of using the branches are quite simple:

  1. From a branch, we create another branch.
  2. We develop this new branch.
  3. To apply the changes made on this new branch to the original branch, a merge operation is performed.

Conceptually, a branch system is represented in this way:

In this diagram, we see that branch B is created from branch A. These two branches ...

Get Learning DevOps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.