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

Re: [idea] separate .git dir and the working tree

From
MGMike Gant <mike@gantsfort.com>
Date
Feb 5, 2011, 03:23 UTC
Message-ID
<20110205032339.GA15303@mg1>
In-Reply-To
<AANLkTik4MjnpOzPdGy7ZDiH0in4e1DpjrhQFOHjUiEEE@mail.gmail.com>
On Sat, Feb 05, 2011 at 10:53:58AM +0800, redstun wrote:
Show 14 quoted lines
> First please shout if this is a known feature :-)
> 
> I think separating the .git directory from its working tree could
> increase the safety of the data to one more level higher.
> 
> We might have a git variable set to specify (a shared place) where to
> put the .git directories (or the data inside it), then use
> "/path/to/working/tree" as (or the seed to calculate) a hash key to
> map from the (.git directory in the) shared place to the working tree
> directory.
> 
> Or we may have just a few data (that can be re-created) stored in the
> .git directory along with the working tree, and most of the revision
> history stored in the shared place.

GIT_DIR and GIT_WORK_TREE might be what you are looking for. Explanation of usage in 'man git'

HTH Mike

> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: redstunNext: Jonathan Nieder
Message 2 of 12 in “[idea] separate .git dir and the working tree”
  1. redstunFeb 5, 2011
  2. Mike GantFeb 5, 2011
  3. Jonathan NiederFeb 5, 2011
  4. redstunFeb 5, 2011
  5. Jonathan NiederFeb 5, 2011
  6. Mike GantFeb 6, 2011
  7. Mike GantFeb 6, 2011
  8. Jared HanceFeb 6, 2011
  9. Konstantin KhomoutovFeb 6, 2011
  10. [idea] Re: separate .git dir and the working treeNicolas Sebrecht, Feb 6, 2011
  11. Mike GantFeb 7, 2011
  12. Michael WittenMay 23, 2011

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.