On 10/04/12 16:15, Michael Hendricks wrote:
Does that actually happen with rebase? I thought you end up with two copies of the changes, or does it also rewind the source branch?Git rebase rewinds the source branch.
It does both :-) The original commits are still in there, and can be found again using the reflog, but the branch now points to the new commits.
In more detail: recall that git branches are just autoincrementing pointers to nodes in the history DAG. Suppose that we have branches branch_a and branch_b, pointing to commits A and B, with common ancestor C. For simplicity, let's suppose that A is a direct child of C. If we rebase branch_a onto branch_b, then we create a new commit A' which is the result of applying diff(C, A) to B. We then move branch_a to point at A'. The commit A is still in there, accessible as HEAD@{1}, but not reachable from any named branch. If it remains unreachable, it will eventually be garbage-collected.
HTH, Miles _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
