On Tue, Mar 18, 2014 at 1:46 PM, Jean-Marc Lasgouttes
<lasgout...@lyx.org> wrote:
> 18/03/2014 12:56, Vincent van Ravesteijn:
>
>
>> I don't see the need for keeping the merges. However, I cannot access
>> the git repo right now.
>
>
> I do not necessary want to keep them, I just do not want to have mix my
> commits with the stuff from master.
>
> Is it possible to remove merges a posteriori?
>
> Concerning what I pushed to str-metrics-test, there are still some commits
> that do unrelated things and should be split. But then I would need to
> reorder commits to squash ubparts where they belong.
>
>
>> Did you try to rebase onto master ?
>
>
> rebase --onto is much too scary for me. I am not sure why/how I would use
> it.
>
> JMarc
>

rebase --onto is just the "plain" rebase.  However, usually you do not
use "--onto" explicitly.

If your history is

A--------B-------C
              \
               ------ D


$ git checkout D
$ git rebase C

is the same as

$ git checkout D
$ git rebase --onto C B D

Both result in

A------B-----C------D

When you really need the second variant is if your history is like:

A----B----C
         \
          ------D-------E

with D and E different features.

Now, you want to rebase E onto C, but you want to discard B..D.

$ git checkout E
$ git rebase --onto C D E

Vincent

Reply via email to