What are the advantages of a rebase over a merge in git?
Posted
by eSKay
on Stack Overflow
See other posts from Stack Overflow
or by eSKay
Published on 2010-05-20T17:56:00Z
Indexed on
2010/05/20
18:00 UTC
Read the original article
Hit count: 213
In this article, the author explains rebasing with this diagram:
Rebase: If you have not yet published your branch, or have clearly communicated that others should not base their work on it, you have an alternative. You can rebase your branch, where instead of merging, your commit is replaced by another commit with a different parent, and your branch is moved there.
while a normal merge would have looked like this:
So, if you rebase, you are just losing a history state (which would be garbage collected sometime in the future). So, why would someone want to do a rebase at all? What am I missing here?
© Stack Overflow or respective owner