views:

882

answers:

1

Compare to standard push/pull, what is the advantages of using the rebase command in Mercurial?

+7  A: 

This post has a nice explanation:

The answer lies in rebasing. Rebasing is a technique made popular by git where you rewrite your not-yet-pushed patches so that they apply against the current remote tip, rather than against the tip of the repository you happened to last pull. The benefit is that your merge history shows useful merges—merges between major branches—rather than simply every single merge you did with the upstream repository.

Normal pull, merge, push sequence will create a number of commits that are not very useful in terms of the history of your repository. Rebasing helps to eliminate these.

Vincent Ramdhanie
Clear answer, thanks Vincent. From my perspective, however, it makes me think that if that's all there is to it, it might not have been worth the trouble of adding a new feature and a new concept for users to think about.
Tomislav Nakic-Alfirevic
you don't have to use rebasing, you can always branch and merge. iirc rebase is not enabled by default in mecurial
jk
@jk If it's not enable by default, is it a good idea to ask all the developers to enable it? What will happen if some one doesn't?
Vincent