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

Re: .git inside a .git: is it safe?

From
Jakub Narebski <jnareb@gmail.com>
Date
Mar 12, 2007, 22:56 UTC
Message-ID
<et4lmo$nnj$1@sea.gmane.org>
In-Reply-To
<8b65902a0703121456s56008088ra14452ef7f325cf3@mail.gmail.com>
Guilhem Bonnefille wrote:
Show 29 quoted lines
> Hi,
> 
> I'm actually working on the packaging of a project. To do so, I use
> two Git repositories:
> - one to follow the main project
> - one to manage my updates on this project.
> 
> But, the matter is I cannot merge the both root. I need to have the
> main project sources in a subdirectory of my own project. My workspace
> is as follow: myproject/sub/tree/mainproject
> 
> With SVN, I think such things are handled with svn:external.
> 
> Actually, with Git, I frequently copy the mainproject inside its
> subtree in my workspace.
> 
> 
> But, I recently discover that everything seems fine if I include the
> Git repo of mainproject inside the Git repo of my project. The layout
> lloks like this:
> myproject
> |- .git
> |- sub
>   |- tree
>     |- mainproject
>       |- .git
> 
> 
> It seems to work. But do you think such layout is "safe" ?

IIRC Junio uses similar layout managing todo branch in git.git (which comes from separate repository).

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Guilhem Bonnefille
Message 4 of 4 in “.git inside a .git: is it safe?”
  1. Guilhem BonnefilleMar 12, 2007
  2. Shawn O. PearceMar 12, 2007
  3. Guilhem BonnefilleMar 14, 2007
  4. Jakub NarebskiMar 12, 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.