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

Re: working directory status

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Nov 18, 2019, 07:01 UTC
Message-ID
<CAPig+cTBnWyLVLJBpeFhmW3yOmgiCr0YT3aHQFBT=pXWcheRLw@mail.gmail.com>
In-Reply-To
<31883f6f-7b5a-a2aa-951d-51f9eee6f68d@kdbg.org>
On Mon, Nov 18, 2019 at 1:51 AM Johannes Sixt <j6t@kdbg.org> wrote:
Show 21 quoted lines
> Am 18.11.19 um 05:32 schrieb Sivanandan Srilakshmanan:
> > I was reluctant to create clones of each project on my local machine
> > each with it's own "main working tree"
> >
> > I figured:-
> >
> > I could setup a "Local bare repository" and create remote link to the
> > hosted git repositories.
> > (https://git-scm.com/docs/git-worktree#_list_output_format)
> >
> > Create "Local branches" when needed. Create a "linked working tree"
> > associated with the local branch.
> >
> > This way I can have a single repository pointing to multiple remote
> > repositories on one side and managing multiple local directories on my
> > PC.
> > In summary, my local repository will be conduit. I guess this is not possible.
>
> I think it is possible. Just don't make it a bare repository if you need
> to create secondary worktrees. (But maybe it even works if it is bare;
> just don't set GIT_DIR; I don't do it this way, so I cannot tell.)

git-worktree explicitly supports the use-case of the main worktree being bare. (Of course, in this case, it's a misnomer to call it the "main _worktree_", but the terminology was already established by the time explicit support for bareness was added, so the term "main worktree" stuck.)

Previous: Johannes SixtNext: Junio C Hamano
Message 9 of 11 in “working directory status”
  1. Sivanandan SrilakshmananNov 17, 2019
  2. Pratyush YadavNov 17, 2019
  3. Sivanandan SrilakshmananNov 17, 2019
  4. Johannes SixtNov 17, 2019
  5. Sivanandan SrilakshmananNov 17, 2019
  6. Johannes SixtNov 17, 2019
  7. Sivanandan SrilakshmananNov 18, 2019
  8. Johannes SixtNov 18, 2019
  9. Eric SunshineNov 18, 2019
  10. Junio C HamanoNov 18, 2019
  11. Sivanandan SrilakshmananNov 18, 2019

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.