Information Technology Reference
In-Depth Information
Figure 7-2 . Rebasing “moves” commits from current branch above another branch
As you already know from Recipe 5-8 there is no way to move revisions from one
place to another. All you can do is to create a new revision that will have the same
comment and that will introduce the same changes to your files. That's why the revi-
sions in Figures 7-1(b) and 7-2 contain primes. It underlines the fact that these are new
revisions with different SHA-1 names.
What happens to the original revisions f1 , f2 , and f3 ? Nothing. They are left in-
tact. To be more accurate, rebasing can be depicted as seen in Figure 7-3 . The original
revisions f1 , f2 , and f3 are not referred to by any branch anymore—they became
dangling revisions. But they remain unchanged in the database. At least as long as you
do not expire the reflog and prune the database.
 
 
Search WWH ::




Custom Search