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

GIT_WORK_TREE and GIT_DIR with git clone

From
KKKacper Kornet <kornet@camk.edu.pl>
Date
Mar 26, 2011, 12:58 UTC
Message-ID
<20110326125818.GA2621@camk.edu.pl>

Is there a reason why git clone does not respect GIT_DIR variable. I have found it confusing that:

GIT_WORK_TREE=repo GIT_DIR=repo/.git git clone <path>/repo.git
is not equivalent to
git clone <path>/repo.git
-- 
  Kacper
Next: Junio C Hamano
Message 1 of 3 in “GIT_WORK_TREE and GIT_DIR with git clone”
  1. Kacper KornetMar 26, 2011
  2. Junio C HamanoMar 26, 2011
  3. Kacper KornetMar 26, 2011

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.