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

Re: working directory status

From
Johannes Sixt <j6t@kdbg.org>
Date
Nov 18, 2019, 06:51 UTC
Message-ID
<31883f6f-7b5a-a2aa-951d-51f9eee6f68d@kdbg.org>
In-Reply-To
<CACKP9csUwnYJFL55KSMmys+o7FC5Wzds_2kbCcYNESiL-SES1A@mail.gmail.com>
Am 18.11.19 um 05:32 schrieb Sivanandan Srilakshmanan:
Show 27 quoted lines
> Hi Hannes,
> 
> Thank you so very very, very much for your guidance.
> 
> My team and I maintain multiple projects, each with it's own remotely
> hosted git repository.
> 
> 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.
> 
> Clean up the linked working tree when work is complete.
> 
> 
> 
> 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.)

> Based on my requirement would you suggest the best approach would be
> to create git clone for each remote repository?
That is probably easier.
-- Hannes
Previous: Sivanandan SrilakshmananNext: Eric Sunshine
Message 8 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.