All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
Cc: GIT <git@vger.kernel.org>
Subject: Re: Prepend the history of one git tree to another
Date: Mon, 20 Feb 2006 11:14:28 +0100	[thread overview]
Message-ID: <43F99684.5070403@op5.se> (raw)
In-Reply-To: <20060220090909.GT6558@cip.informatik.uni-erlangen.de>

Thomas Glanzmann wrote:
> Hello,
> I have two trees: blastwave and blastwave.old. blastwave.old is the
> BitKeeper -> CVS -> GIT Tree of the project and blastwave is the newer
> one that I started when I stoped using bitkeeper. What I want is to 
> append the history of blastwave to blastwave.old. The problem is that I
> need to create new commit objects for every commit I want to append to
> the old history. Is there a script which does that for me? Or do I have
> to write this script myself?
> 

Something like this might do the trick, depending on how linear your 
ancestry graph is:

$ cd blastwave
$ first=$(git rev-list HEAD | tail -n 1)
$ git format-patch -k --stdout $first..HEAD > ../blw.mbox
$ cd ../blastwave.old
$ git am -k -3 ../blw.mbox

YMMV though, so set an anchor tag at the HEAD of blastwave.old so you 
can return to it if things go awry. If the history is very non-linear I 
think you'll have to do the same for each and every branch, although 
you'd have to use "git merge-base" to figure out how long to go.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  reply	other threads:[~2006-02-20 10:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-20  9:09 Prepend the history of one git tree to another Thomas Glanzmann
2006-02-20 10:14 ` Andreas Ericsson [this message]
2006-02-20 10:43   ` Thomas Glanzmann
2006-02-20 10:57     ` Ryan Anderson
2006-02-20 12:20       ` Thomas Glanzmann
2006-02-20 12:51     ` Johannes Schindelin

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=43F99684.5070403@op5.se \
    --to=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=sithglan@stud.uni-erlangen.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.