Rebasing branches
With the git rebase command you can also modify the story of branches; one of the things you do more often inside a repository is to change - or better to say - move the point where a branch started, bringing it to another point of the tree. This operation makes it possible to keep low the level of ramifications that would instead be generated using the command git merge, which we will see later.
In order to better understand this, let me give you an example.
Let's imagine that to the commit where the orange was added, a branch nuts was created in the past, to which a walnut was added.
At this point, let's imagine that we want to move this branch above, to the point where it is now master as if this branch had been created ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access