Chapter 13. Merging vs. rebasing

This chapter covers

  • Using CMake’s branching and merging strategy to manage contributions
  • Using Homebrew’s rebasing and squashing strategy to manage contributions
  • Deciding what strategy to use for your project

As discussed in technique 14 and technique 43, merging and rebasing are two strategies for updating the contents of one branch based on the contents of another. Merging joins the history of two branches together with a merge commit (a commit with two parent commits); and rebasing creates new, reparented commits on top of the existing commits.

Why are there two strategies for accomplishing essentially the same task? Let’s find out by comparing the Git history of two popular open source projects and ...

Get Git in Practice now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.