git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Jonathan Nieder" <jrnieder@gmail.com>,
	"Dirk Süsserott" <newsletter@dirk.my1.cc>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: Q: rebasing (moving) a whole tree (not just one branch)
Date: Fri, 18 Mar 2011 23:53:23 +0100	[thread overview]
Message-ID: <201103182353.24517.j6t@kdbg.org> (raw)
In-Reply-To: <7vaagsw2qb.fsf@alter.siamese.dyndns.org>

On Freitag, 18. März 2011, Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
> > Dirk Süsserott wrote:
> >> I'd like to rebase a whole tree from A to B. Not just a single
> >> branch, but a whole tree. Let's say I have the following history:
> >>
> >> --- A --- B
> >>
> >>     + -- C -- D
> >>
> >>          + E -- F
> >>
> >> I'd like to rebase C and its descendants from A to B
> >
> > I'd suggest cheating by making a merge of D and F and "rebase -p"-ing
> > that. :)
> >
> > To say something more sensible would probably require more information
> > about the particular application, though.
>
> I am not a huge fan of filter-branch, but shouldn't you be able to
> filter-branch D and F (and no other branch) on top of B?

Not in a trival way. You would need a tree-filter that re-applies the change 
between A and B to every transcribed commit. That will work well only if 
there are no conflicts.

-- Hannes

      parent reply	other threads:[~2011-03-18 22:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18 20:05 Q: rebasing (moving) a whole tree (not just one branch) Dirk Süsserott
2011-03-18 20:26 ` Jonathan Nieder
2011-03-18 21:14   ` Junio C Hamano
2011-03-18 21:34     ` Jonathan Nieder
2011-03-18 22:53     ` Johannes Sixt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201103182353.24517.j6t@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=newsletter@dirk.my1.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).