O'Reilly logo

Continuous Delivery with Windows and .NET by Chris O'Dell, Matthew Skelton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Version Control

Controlling versions of text files (code, configuration, static data, etc.) is a crucial facet of Continuous Delivery. Version control provides traceability, predictability, and repeatability, because we’re forced to treat the version control system as the definitive source of truth. Version control is also a central communication mechanism between teams and team members, indicating the intent and purpose of our changes so that people can make better decisions.

Key Version Control Practices

Some important principles for version control in a Continuous Delivery context are:

  • Commits to version control should be cohesive and meaningful, helping people to see why a change was made.

  • Commits should happen many times per day—if your version control system or practices work against multiple daily commits, you’re likely using the wrong approach.

  • Branch as little as possible (see “Branching Options”)—use techniques such as feature toggles to manage partially completed work. Focus on completing a small number of changes rather than tackling many things in parallel.

  • Any non-trunk branches should be short-lived—especially feature branches.

Furthermore, for Continuous Delivery, we tend to prefer many smaller repositories to one large repository, using package management to bring together dependent modules (see “Use NuGet to Manage Internal Dependencies”).

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required