Changes between Version 37 and Version 38 of GitForDarcsUsers


Ignore:
Timestamp:
Jun 1, 2011 1:16:46 PM (4 years ago)
Author:
igloo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GitForDarcsUsers

    v37 v38  
    5858First of all, {{{git rebase}}} is a very dangerous feature, ''it should never be done in shared repositories'' (this is like {{{darcs amend-record}}} and {{{darcs unpull}}}, but even harder to fix.)
    5959
    60 {{{git rebase}}} is a way to "rewrite history".  You can use this to remove bad patches or to move a branch. For example, consider the following history:
     60{{{git rebase}}} is a way to "rewrite history". For example, if you have developed feature1 in its own branch:
     61{{{
     62      x---x---x---x <-- feature1
     63     /
     64o---o---o---o---o <-- master
     65}}}
     66then you can run
     67{{{
     68git checkout feature1
     69git rebase master
     70}}}
     71to end up with
     72{{{
     73o---o---o---o---o---x---x---x---x <-- master
     74}}}
     75
     76You can also use this to remove bad patches or to move a branch. For example, consider the following history:
    6177{{{
    6278      A---B---C---D <-- feature1