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

Re: GIT_WORK_TREE and GIT_DIR with git clone

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 21, 2014, 20:23 UTC
Message-ID
<xmqq4n4xulrm.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAKJdRamFDDWRZDHBCe7GrXg0OWhLfBPq_ofsvowaW9d8VOGTMA@mail.gmail.com>
Cosmin Apreutesei <cosmin.apreutesei@gmail.com> writes:
Show 8 quoted lines
> I would like to be able to tell my users that they can simply do:
>
> git clone --git-dir=_/git/module1/.git module1-url
> git clone --git-dir=_/git/module2/.git module2-url
>
> which will overlay the files from both modules into the current
> directory, which from git's perspective is the work-tree for both
> modules.

Would there be a sensible semantics in the resulting working tree? Which repository would a new file in such a combined working tree belong to?

Previous: Cosmin ApreuteseiNext: Cosmin Apreutesei
Message 2 of 3 in “GIT_WORK_TREE and GIT_DIR with git clone”
  1. Cosmin ApreuteseiJan 20, 2014
  2. Junio C HamanoJan 21, 2014
  3. Cosmin ApreuteseiJan 21, 2014

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.