All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Phillip Susi <psusi@cfl.rr.com>
Cc: git@vger.kernel.org
Subject: Re: No working tree repository
Date: Tue, 15 Jun 2010 22:58:20 +0200	[thread overview]
Message-ID: <vpq7hm0dndf.fsf@bauges.imag.fr> (raw)
In-Reply-To: <4C17C77C.9000002@cfl.rr.com> (Phillip Susi's message of "Tue\, 15 Jun 2010 14\:33\:32 -0400")

Phillip Susi <psusi@cfl.rr.com> writes:

> On 6/15/2010 2:10 PM, Matthieu Moy wrote:
>> 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/

  parent reply	other threads:[~2010-06-15 20:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15 17:56 No working tree repository Phillip Susi
2010-06-15 18:10 ` Matthieu Moy
2010-06-15 18:33   ` Phillip Susi
2010-06-15 20:41     ` Wesley J. Landaker
2010-06-15 20:58     ` Matthieu Moy [this message]
2010-06-16  6:20     ` Johannes Sixt
2010-06-16  8:36     ` Peter Krefting
2010-06-15 19:39   ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpq7hm0dndf.fsf@bauges.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=psusi@cfl.rr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.