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

1.5.0.rc1.g4494: Can't use a bare GIT_DIR to add

From
Horst H. von Brand <vonbrand@inf.utfsm.cl>
Date
Jan 12, 2007, 15:45 UTC
Message-ID
<200701121545.l0CFjMC1017088@laptop13.inf.utfsm.cl>
I tried this:
  
  mkdir xyz
  cd xyz
  git --git-dir=../xyz.git   
     # Initialized empty Git repository in ../xyz.git/
  echo Junk > file-a
  git --git-dir=../xyz.git add .
     # fatal: add cannot be used in a bare git directory

I expected that "GIT_DIR is bare, over there, stuff is here" works the same as "GIT_DIR is .git, right here among stuff".

-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                    Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria             +56 32 2654239
Casilla 110-V, Valparaiso, Chile               Fax:  +56 32 2797513
Next: Junio C Hamano
Message 1 of 3 in “1.5.0.rc1.g4494: Can't use a bare GIT_DIR to add”
  1. Horst H. von BrandJan 12, 2007
  2. Junio C HamanoJan 12, 2007
  3. Junio C HamanoJan 12, 2007

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.