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

Re: Feature Enhancement Idea.

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 24, 2009, 05:56 UTC
Message-ID
<m3bpl0c2cf.fsf@localhost.localdomain>
In-Reply-To
<5b5e291e0909222317q47ae36d4la470f17ec3902124@mail.gmail.com>
Deon George <deon.george@gmail.com> writes:
Show 14 quoted lines
> I'm not sure if this is the right place, but I thought I'd post my
> idea and maybe somebody will either redirect me to the right place, or
> give me that "that won't happen".
> 
> Im fairly new to GIT (wish I had discovered it long ago), and I really
> like using it - great work guys/garls :)
> 
> My idea is to enhance GIT to support (I'll call it) development
> "layers". The current design of GIT is that the working repository and
> working directory assume that all files belong together in the same
> project. I would like to see GIT go 3D and support layers, so that
> files (and/or file content) can belong to multiple repositories (or
> considered unique projects), even though the working tree presents all
> files as if they were one.
[cut very long description]
> Could this be included as part of GITs functionality (or is it
> possible already) ?

First, I assume there that you do not allow for the same file to belong to different repositories.

Second, if all parts that you want to belong to other repository are in separate subdirectories, and all files in those subdirectories belong to this other repository, you can try either submodules (git-submodule), or subtree (subtree merge, or third-party git-subtree helper). Note also that this assume that you want to have 'master' repository which indirectly or directly has al the files.

Third, if the above isn't what you want, then you can manually intermingle working directories of different git repositories (probably requiring decouplig of bare git repository (git-dir) from working area (work-tree)). Git repository know what files it tracks, so you would only need to take care to ignore files that belong to other repositories.

If it is to manual for you, and to error prone, you are welcome to come up with set of scripts implementing "layers" feature you want. That is how initial version of submodule feature was done...

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Deon GeorgeNext: Deon George
Message 9 of 11 in “Feature Enhancement Idea.”
  1. Deon GeorgeSep 23, 2009
  2. Christian CouderSep 23, 2009
  3. Johan HerlandSep 23, 2009
  4. Deon GeorgeSep 23, 2009
  5. Ciprian Dorin, CraciunSep 23, 2009
  6. Johan HerlandSep 23, 2009
  7. Junio C HamanoSep 23, 2009
  8. Deon GeorgeSep 24, 2009
  9. Jakub NarebskiSep 24, 2009
  10. Deon GeorgeSep 24, 2009
  11. Eric RaibleSep 24, 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.