O'Reilly logo

Pragmatic Version Control Using Git by Travis Swicegood

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

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 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 Rewriting History where you used git rebase -i to interactively rewrite the history. You ...

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