Transplant branch from another repository

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Transplant branch from another repository

From: Jeenu V <hidden>
Date: 2016-06-15 22:47:48

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

Re: Transplant branch from another repository

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:47:48

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help