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

Re: No working tree repository

From
Peter Krefting <peter@softwolves.pp.se>
Date
Jun 16, 2010, 08:36 UTC
Message-ID
<alpine.DEB.2.00.1006160933270.10800@ds9.cixit.se>
In-Reply-To
<4C17C77C.9000002@cfl.rr.com>
Phillip Susi:
> It seems that --bare on clone will prevent the checkout of the local 
> working tree. If I decide I do want the sources today I can just check 
> them out, but what is the proper way to do the reverse?
Then I would recommend creating another clone. I usually do a
   git clone --reference path/to/bare server:path/to/origin newcheckout

to create clones with working trees, without having to pay the penalty of having (yet) another copy of the objects under .git (and with .git in the order of 400 megabytes, and several working copies, it does pay off).

Maintaining this is a lot easier than constantly adding and removing a working tree from the repository.

If you only need a single file, "git show commit:path" should work, even on a bare repository.

-- 
\\// Peter - http://www.softwolves.pp.se/
Previous: Johannes SixtNext: Andreas Schwab
Message 7 of 8 in “No working tree repository”
  1. Phillip SusiJun 15, 2010
  2. Matthieu MoyJun 15, 2010
  3. Phillip SusiJun 15, 2010
  4. Wesley J. LandakerJun 15, 2010
  5. Matthieu MoyJun 15, 2010
  6. Johannes SixtJun 16, 2010
  7. Peter KreftingJun 16, 2010
  8. Andreas SchwabJun 15, 2010

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.