# Re: Transplant branch from another repository

2 messages from 2009-12-01 to 2009-12-17. Participants: Dale Farnsworth, Jeenu V.
Thread: https://gitlist.dev/t/21809

## Dale Farnsworth, 2009-12-01 16:53

Subject: Re: Transplant branch from another repository
Message-ID: <E1NFVyv-0000EN-Qx@xyzzy.farnsworth.org>
URL: https://gitlist.dev/e/E1NFVyv-0000EN-Qx%40xyzzy.farnsworth.org
In-Reply-To: <hf2t2i$l2b$1@xyzzy.farnsworth.org>

```
> Say, I have two repositories A and B (local, independent, but similar
> - they are for content tracking and not collaboration purposes). A has
> a branch 'a', which I want to have in B. What I mean is that I'd like
> to have the sequence of changes in the branch 'a' to be present in B,
> thus creating an independent branch 'b' in B.
> 
> Is there any way to achieve this? One thing that I could think of is
> to use 'format-patch' to generate the list of patch files from A. But
> I don't see how to convert those patches to a sequence of commits in
> repo B. I could do a 'git apply patches/*' but then all patches
> collapse to one single commit. If format-patch is a/the way, could
> somebody tell me how to get this done? Or are there any alternatives?
> 
> FWIW: I'm running Git under Cygwin, and sendmail isn't configured.

Try "cd B; git fetch A a:b"

-Dale


Dale Farnsworth

```

## Jeenu V, 2009-12-17 11:06

Subject: Re: Transplant branch from another repository
Message-ID: <5195c8760912170306p28b182adrcd1990b9ec6fa2bc@mail.gmail.com>
URL: https://gitlist.dev/e/5195c8760912170306p28b182adrcd1990b9ec6fa2bc%40mail.gmail.com
In-Reply-To: <E1NFVyv-0000EN-Qx@xyzzy.farnsworth.org>

```
On Tue, Dec 1, 2009 at 10:23 PM, Dale Farnsworth <dale@farnsworth.org> wrote:
> [...]
> Try "cd B; git fetch A a:b"

Thanks.
-- 
:J

```
