Thread (1 message) 1 message, 1 author, 2016-06-15

Re: No working tree repository

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:48:58

Phillip Susi [off-list ref] writes:
On 6/15/2010 2:10 PM, Matthieu Moy wrote:
quoted
This is called a "bare" repository. Now, you have the keyword to
RTFM ;-).
Ahh, that's the magic word I was groping for.

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?  I was thinking
something like somehow empty the index file then do a git-reset or
git-checkout-index to clean up the working tree to match the empty
index, but I can't figure out how to empty the index.
rm -fr *  # use at your own risk
rm -f .git/index

Then, you can get back a tree with "git checkout" or "git checkout
HEAD -- .". The advantage of this solution over the empty-branch
solution is that although you destroyed your index, HEAD is still
there so "git log" and friends will show you where you are.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help