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

Re: tool and worktree

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 8, 2009, 19:25 UTC
Message-ID
<20090208192528.GC30557@spearce.org>
In-Reply-To
<20090208034406.GB7230@b2j>
bill lam <cbill.lam@gmail.com> wrote:
Show 13 quoted lines
> I track /etc using a config
> 
> [core]
> 	repositoryformatversion = 0
> 	filemode = true
> 	bare = false
> 	worktree = /etc
> 	logAllRefUpdates = true
> 	excludesfile =
> 
> But that can not be handled by tools,
> 
> git gui : cannot use funny .git directory .

If someone sends patches for git-gui, maybe. This use case of different repository and worktree isn't very common for git-gui so it doesn't support it.

On Windows with some versions of Tcl/Tk I've had trouble in the past with Git finding the repository when forked out of the wish process. To work around it I just required that the repository be in ".git".

Have you tried making /etc/.git a symlink to the real repository?

BTW, tracking /etc/ in git won't track permissions and ownership so restoring /etc from git isn't enough on its own. Usually I use some sort of shell script to copy /etc to another location and check it into git, and a different script to go the other way, with that script handling mode and ownership as it goes.

-- 
Shawn.
Previous: Jonas Fonseca
Message 6 of 6 in “tool and worktree”
  1. bill lamFeb 8, 2009
  2. Jonas FonsecaFeb 8, 2009
  3. Jonas FonsecaFeb 9, 2009
  4. bill lamFeb 9, 2009
  5. Jonas FonsecaFeb 9, 2009
  6. Shawn O. PearceFeb 8, 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.