CHAPTER 7

image

Rebasing Branches

You can join two different development histories with the $ git merge and $ git rebase commands. In this chapter we will deal with rebasing. Merging was discussed in the previous chapter.

Generally speaking rebasing is a method for converting divergent branches into linear history. You can think about it as an automatic cherry-picking operation for moving a series of commits from one place on the graph to another. The advantages of using rebasing will become apparent when you start to cooperate with other developers in the same repository. By using the rebasing command you will be able to produce a clean linear history ...

Get Git Recipes: A Problem-Solution Approach 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.