git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Transplant branch from another repository

From
DFDale Farnsworth <dale@farnsworth.org>
Date
Dec 1, 2009, 16:53 UTC
Message-ID
<E1NFVyv-0000EN-Qx@xyzzy.farnsworth.org>
In-Reply-To
<hf2t2i$l2b$1@xyzzy.farnsworth.org>
Show 14 quoted lines
> 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
Next: Jeenu V
Message 1 of 2 in “Re: Transplant branch from another repository”
  1. Dale FarnsworthDec 1, 2009
  2. Jeenu VDec 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.