How it works...

When you execute git rebase, Git starts by finding the common ancestor of the current HEAD branch and the branch you want to rebase to. When Git finds merge-base, it will find the commits that are not available in the branch you are rebasing onto. Git will simply try to apply those commits one by one.

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