O'Reilly logo

Learn Git in a Month of Lunches by Rick Umali

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 10. Merging branches

In the preceding chapter, you created multiple branches, diverging your code base. You learned that when you work on a branch, you’re working on a separate line of development. If you want to incorporate the work from your separate branch back into your main line of development, you need to use git merge, as shown in figure 10.1.

Figure 10.1. A typical merge. The commits are the boxes with letters.

Branching diverges code bases, and merging converges code bases. In figure 10.1, we diverge the code base at commit B, making two branches: master and new_feature. We then make some commits on both branches. Next, using ...

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