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

Re: how to combine two clones in a collection

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
Jul 10, 2007, 23:45 UTC
Message-ID
<200707110145.28931.robin.rosenberg.lists@dewire.com>
In-Reply-To
<47015E14-FEA7-45C5-B9CB-C949B87B6494@silverinsanity.com>
tisdag 10 juli 2007 skrev Brian Gernhardt:
Show 22 quoted lines
> 
> On Jul 10, 2007, at 3:27 PM, Kalle Pokki wrote:
> 
> > You can also just create two different git repositories and start  
> > making
> > the commits in the master (or any other) branch. Then combine the
> > repositories by fetching
> >
> >         cd repo1
> >         git fetch ../repo2 master:repo2
> >
> > This way the branches don't share anything, do they?
> 
> Yes, that's what I was referring to at the end when I wrote:
> 
> > You could also create the branch in a second repository and pull it  
> > from there into the first (probably simpler),
> 
> But it seemed too simple.  ;-)  And that is exactly how I'd do it...   
> Assuming I thought of it before using write-tree, commit-tree, and  
> update-ref.  (Which is what happened.  I thought of the complicated  
> method and wrote it up before thinking "duh, just use a second repo.")
And the simplest way to create an new indpendent branch:

echo ref: refs/heads/newbranch >.git/HEAD Then prepare the content and commit like you used to do.

-- robin
Previous: Brian GernhardtNext: martin f krafft
Message 12 of 16 in “how to combine two clones in a collection”
  1. martin f krafftJul 9, 2007
  2. Linus TorvaldsJul 10, 2007
  3. martin f krafftJul 10, 2007
  4. Junio C HamanoJul 10, 2007
  5. martin f krafftJul 10, 2007
  6. Martin LanghoffJul 10, 2007
  7. Linus TorvaldsJul 10, 2007
  8. martin f krafftJul 10, 2007
  9. Brian GernhardtJul 10, 2007
  10. Kalle PokkiJul 10, 2007
  11. Brian GernhardtJul 10, 2007
  12. Robin RosenbergJul 10, 2007
  13. martin f krafftJul 11, 2007
  14. Johannes SchindelinJul 11, 2007
  15. martin f krafftJul 11, 2007
  16. Jakub NarebskiJul 11, 2007

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.