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

GIT_DIR output from git worktree list

From
Gabriel Nützi <gnuetzi@gmail.com>
Date
Sep 29, 2020, 17:30 UTC
Message-ID
<CAA9rTudStQOK7kRa6jYJHE3D3grnFF3idQe65h9t6oJB30xa1A@mail.gmail.com>
Hello,
When you do move the .git folder somewhere else:
git init Test && cd Test && mv .git .git-b
and then do

cd Test && git --git-dir=.git-b --work-tree . worktree list

the output is : ..../Test/.git-b 0000000 [master]

Why is the output a .git Dir and not a worktree. I expected `.../Test`.

Thanks for the help. BR Gabriel

Next: Eric Sunshine
Message 1 of 9 in “GIT_DIR output from git worktree list”
  1. Gabriel NütziSep 29, 2020
  2. Eric SunshineSep 30, 2020
  3. Gabriel NütziSep 30, 2020
  4. Eric SunshineSep 30, 2020
  5. Eric SunshineDec 7, 2020
  6. Ganriel NütziDec 7, 2020
  7. Eric SunshineDec 8, 2020
  8. Duy NguyenDec 9, 2020
  9. Eric SunshineDec 13, 2020

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.