9.3 Rebasing a Branch

Branches are a great way to organize your work, but keeping everything in sync between branches has been branching’s Achilles’ heel. With merge tracking, such as Git provides, the effort required to keep everything in sync is greatly reduced, but there is another way.

For example, in Section 8.2, Handling Release Branches, you added code to the RB_1.0.1 branch. There’s a new paragraph that exists in the 1.0.1 tag that master doesn’t know about yet.

You can rebase master against that tag so that the change is incorporated into the history of the master branch, as if the master had always had that change.

We talked about git rebase earlier in Section 6.7, Rewriting History where you used git rebase -i to interactively ...

Get Pragmatic Version Control Using Git 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.