Git development
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Robin Luckey <robinluckey@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Easy way to empty working tree?
Date: Thu, 20 Jul 2006 19:48:53 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0607201944460.29649@g5.osdl.org> (raw)
In-Reply-To: <761519800607201828m19684b2jc267411ef3b8b9e2@mail.gmail.com>



On Thu, 20 Jul 2006, Robin Luckey wrote:
>
> I have some very large git repositories that serve mainly as archives,
> and it would be nice to clear out the working directories for the
> repositories I am not currently working with. I'm not trying to delete
> the files from the repository, I just want free up space in idle
> repositories.

Well, that actually sounds like you might want to just make them totally 
"bare" repositories, ie you can just do something like

	mv repo/.git repo.git
	rm -rf repo

and then "repo.git" is a valid bare repository.

However, if you actually want to just clear the checked-out files:

> After mothballing the repository with git-repack -a -d and git clean
> -d -x, is there a convenient one-liner to empty the files out the
> working directory?

Well, you can do

	git ls-files -z | xargs -0 rm -f --

or something, or indeed just do a "rm -rf *", since the only thing you 
actually would want to save is the ".git" directory.

		Linus

  reply	other threads:[~2006-07-21  2:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-21  1:28 Easy way to empty working tree? Robin Luckey
2006-07-21  2:48 ` Linus Torvalds [this message]
2006-07-21  7:08   ` Alex Riesen

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=Pine.LNX.4.64.0607201944460.29649@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=robinluckey@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox