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

Re: adding arbitary folders to the git index, from outside of the repository

From
Mike Ralphson <mike.ralphson@gmail.com>
Date
Apr 29, 2009, 07:44 UTC
Message-ID
<e2b179460904290044q2f55ff90x4a8f3b9cab18006b@mail.gmail.com>
In-Reply-To
<200904290206.31153.robin.rosenberg.lists@dewire.com>
2009/4/29 Robin Rosenberg <robin.rosenberg.lists@dewire.com>:
> onsdag 29 april 2009 00:54:54 skrev Andrew Bush:
>> I have a desire to have a single git repository that tracks the
>> content of an array of folders located in various places across my
>> file system.
Show 5 quoted lines
> What I do sometimes is set GIT_DIR and then add paths relative to
> / and adding excludes for some paths. That way I can cover /etc and
> selected parts of /var and other interesting areas. You cannot
> however have different roots for your trees, unless you make
> the tree using e.g symbolic links to the different directories.

You can also support having different roots for your trees if you commit them to distinct branches. You would need to remember which root applies to each branch, but you could name the branches var, etc, usr/local/etc, home/andrew etc.

Mike
Previous: Robin Rosenberg
Message 3 of 3 in “adding arbitary folders to the git index, from outside of the repository”
  1. Andrew BushApr 28, 2009
  2. Robin RosenbergApr 29, 2009
  3. Mike RalphsonApr 29, 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.