DEV Community

Discussion on: Explain Git Rebase just like I'm five

Collapse
 
nuc profile image
Georgios Giannoutsos Barkas

Rebase will find the common ancestor (the lego base plate) and split your branch (the building without the bicycle store) from there.

It will point the head to the tip of the other branch (top level of the building with the bicycle store) and will replay all your commits on top of that.

Thus, the bicycle store, along with all other levels of that building, will stay where they were first built.

I hope that's clear :)