All of lore.kernel.org
 help / color / mirror / Atom feed
* Transplant branch from another repository
@ 2009-12-01 11:01 Jeenu V
  2009-12-01 16:07 ` Michael J Gruber
  0 siblings, 1 reply; 4+ messages in thread
From: Jeenu V @ 2009-12-01 11:01 UTC (permalink / raw)
  To: git

Hi,

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.

Thanks
Jeenu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Transplant branch from another repository
  2009-12-01 11:01 Transplant branch from another repository Jeenu V
@ 2009-12-01 16:07 ` Michael J Gruber
  0 siblings, 0 replies; 4+ messages in thread
From: Michael J Gruber @ 2009-12-01 16:07 UTC (permalink / raw)
  To: Jeenu V; +Cc: git

Jeenu V venit, vidit, dixit 01.12.2009 12:01:
> Hi,
> 
> 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.

>From within your B repo:

git fetch pathtoA a:b

Cheers,
Michael

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Transplant branch from another repository
  2009-12-01 16:53 ` Dale Farnsworth
@ 2009-12-17 11:06   ` Jeenu V
  0 siblings, 0 replies; 4+ messages in thread
From: Jeenu V @ 2009-12-17 11:06 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Transplant branch from another repository
       [not found] <hf2t2i$l2b$1@xyzzy.farnsworth.org>
@ 2009-12-01 16:53 ` Dale Farnsworth
  2009-12-17 11:06   ` Jeenu V
  0 siblings, 1 reply; 4+ messages in thread
From: Dale Farnsworth @ 2009-12-01 16:53 UTC (permalink / raw)
  To: jeenuv, git

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-12-17 11:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-01 11:01 Transplant branch from another repository Jeenu V
2009-12-01 16:07 ` Michael J Gruber
     [not found] <hf2t2i$l2b$1@xyzzy.farnsworth.org>
2009-12-01 16:53 ` Dale Farnsworth
2009-12-17 11:06   ` Jeenu V

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.