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

What's a "work tree"?

From
MMike <fromlists@talkingspider.com>
Date
Jan 24, 2008, 19:09 UTC
Message-ID
<4798E26D.3040707@talkingspider.com>

I'm trying to figure out what a "work tree" is. as in --work-tree. This is a new command right, the tutorials I've read don't have it. The man page has the syntax but I don't know what it's for.

$ cd /www/mysitedocroot $ git --git-dir /gitdir/mysitegit/ add . fatal: add must be run in a work tree

thanks
Next: Jeff King
Message 1 of 4 in “What's a "work tree"?”
  1. MikeJan 24, 2008
  2. Jeff KingJan 25, 2008
  3. MikeJan 25, 2008
  4. Jeff KingJan 25, 2008

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.