O'Reilly logo

Foundation Version Control for Web Developers by Ian Oxley, Chris Kemper

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

image

Chapter 12

Why Branching Is Great

Wouldn't it be great if your code could exist in a parallel universe, where you could make changes to it in one version without impacting another version? Well, with branching, you can.

SVN, Git, and Mercurial all have ways you can branch your code. In this chapter I'll show you what a branch is, when you can use branches, and how to create them in SVN, Git, and Mercurial. I'll finish the chapter by stepping through a worked example of creating a branch, committing code to it, then merging it back into the main line of development.

What is a branch?

In a version control system a branch is code that diverges ...

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