<div class="gmail_quote">On Sun, Mar 20, 2011 at 9:39 AM, Georg Brandl <span dir="ltr"><<a href="mailto:g.brandl@gmx.net">g.brandl@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Now, "hg pull --rebase" prevents that by "re-basing" the A-B history</div>
line onto the latest remote head. After rebasing, the history looks<br>
like this:<br>
<br>
... --- X --- C --- D --- E --- A' --- B'<br></blockquote><div><br></div><div>Rebasing also allows you to collapse the commits, so you can make the tree look like this:</div><div> </div><div>... --- X --- C --- D --- E --- AB'</div>
<div><br></div><div>Collapsing commits is useful for keeping the repository clean. For example, I make commit A and send it for review. Someone points out some flaws and I make commit B. I don't want the flawed version checked in to the main repository, so I collapse the commits into one commit AB'.</div>
<div><br></div><div>Keeping the repository clean makes it easier to use a bisection search to hunt down the introduction of a bug. If every developer's intermediate commits make it into the main repository, it's hard to go back to an older revision to test something, because many of the older revisions will be broken in some way.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">In reality<br>
it works fine if you know the limits: rebasing really only should be<br>
applied if the changesets are not already known somewhere else,<br>
only in the local repo you're working with.</blockquote><div><br></div><div>The changesets must only be in the local repo *and* they must not have been merged into another branch yet.</div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">On Sun, Mar 20, 2011 at 9:21 AM, Guido van Rossum <span dir="ltr"><<a href="mailto:guido@python.org">guido@python.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Why does everyone want it and hate it at the same time?<br></blockquote></div></div><div><br></div><div>People love it because it's a very powerful tool. People hate it because it allows you to shoot yourself in the foot.</div>
<br>-- <br>Daniel Stutzbach<br>