What's the best method between merging and rebasing ?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

What's the best method between merging and rebasing ?

From: Xavier Maillard <hidden>
Date: 2016-06-15 22:42:59

Hi,

Say I have a project in this state:

orig master -> A -> B -> C -> HEAD

I want to make A diverging from the original branch so I would be
at this state :

orig master -> A -> B -> C -> HEAD
     	    \
	     -> D -> E -> F -> 

I want master to be at  HEAD of the new branch and I want to pick
commits here and there from the original master branch.

How would you do that ?

I think I can't merge directly old master onto new master since
there are several commits I want to drop but what about rebasing
?

I guess I should cherry-pick interesting commits and rebase but I
am not sure.

Help would be greatly appreciated here :)
-- 
Xavier

Re: What's the best method between merging and rebasing ?

From: Pierre Habouzit <hidden>
Date: 2016-06-15 22:42:59

On Mon, Mar 12, 2007 at 12:39:38PM +0100, Xavier Maillard wrote:
Hi,

Say I have a project in this state:

orig master -> A -> B -> C -> HEAD

I want to make A diverging from the original branch so I would be
at this state :

orig master -> A -> B -> C -> HEAD
     	    \
	     -> D -> E -> F -> 

I want master to be at  HEAD of the new branch and I want to pick
commits here and there from the original master branch.
  I'm not sure I get this right, but if I understand you correctly, I'd
say that you could branch your master into a old-master branch.

  then delete the master branch, and branch it again from the "orig
master", then cherry pick from old-master what you want to keep.

  Of course those approachs only "work" if nobody clones your
repository, as you will rewrite history with that.

  But Maybe I missed what you want to achieve :)

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help