Re: import files w/ history
- From
Jeff King <peff@peff.net>
- Date
- Mar 3, 2009, 13:00 UTC
- Message-ID
- <20090303130046.GA7867@coredump.intra.peff.net>
- In-Reply-To
- <slrngqqa4l.1t4t.csaba-ml@beastie.creo.hu>
On Tue, Mar 03, 2009 at 12:54:54PM +0000, Csaba Henk wrote:
> How could I import some files from an unrelated git repo with history?
Just "git pull" from the other repo, which will include all of its history. If you want to pretend that the other history contains just a subset of the true history, use "git filter-branch" to rewrite it first.
Show 10 quoted lines
> And if I'd like to use different paths? Eg:
>
> Say the other repo has these files:
>
> lib/trees/rb_tree.{c,h}
>
> and I want to import them into my repo as
>
> include/rb_tree.h
> src/rb_tree.cIf you are rewriting the history, you can rename the files as you see fit. There is even an example of this in "git help filter-branch".
-Peff